Skip to content

Commit

Permalink
Update relx up to v3.22.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Ovchar committed May 3, 2017
1 parent 5922969 commit 929de48
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 10 deletions.
2 changes: 1 addition & 1 deletion plugins/bootstrap.mk
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ stop(_State) ->
endef

define bs_relx_config
{release, {$p_release, "1"}, [$p, sasl, runtime_tools]}.
{release, {$p_release, "1"}, [$p, sasl, runtime_tools,compiler]}.
{extended_start_script, true}.
{sys_config, "rel/sys.config"}.
{vm_args, "rel/vm.args"}.
Expand Down
2 changes: 1 addition & 1 deletion plugins/relx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RELX ?= $(ERLANG_MK_TMP)/relx
RELX_CONFIG ?= $(CURDIR)/relx.config

RELX_URL ?= https://github.com/erlware/relx/releases/download/v3.19.0/relx
RELX_URL ?= https://github.com/erlware/relx/releases/download/v3.22.3/relx
RELX_OPTS ?=
RELX_OUTPUT_DIR ?= _rel
RELX_TAR ?= 1
Expand Down
51 changes: 43 additions & 8 deletions test/plugin_relx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -114,29 +114,64 @@ else
$t test `$(APP)/tmp/bin/$(APP)_release rpcterms test test` = old
endif

$i "Move the relup tarball to the release directory"
# works with relx-3.22.4
# $i "Check that it's 1 avalible version"
# ifeq ($(PLATFORM),msys2)
# $t test `$(APP)/tmp/bin/$(APP)_release.cmd versions |wc -l` = "2"
# else
# $t test `$(APP)/tmp/bin/$(APP)_release versions |wc -l` = "2"
# endif

$i "Copy the relup tarball to the release directory"
$t mkdir $(APP)/tmp/releases/2
$t mv $(APP)/_rel/$(APP)_release/$(APP)_release-2.tar.gz $(APP)/tmp/releases/2/$(APP)_release.tar.gz
$t cp $(APP)/_rel/$(APP)_release/$(APP)_release-2.tar.gz $(APP)/tmp/releases/2/$(APP)_release.tar.gz
$t test -f $(APP)/tmp/releases/2/$(APP)_release.tar.gz

$i "Upgrade the release and confirm it runs the new code"
ifeq ($(PLATFORM),msys2)
$t $(APP)/tmp/bin/$(APP)_release.cmd upgrade "2/$(APP)_release" $v
# $t $(APP)/tmp/bin/$(APP)_release.cmd unpack "2"
# $t sleep 1
$t $(APP)/tmp/bin/$(APP)_release.cmd upgrade "2"
$t sleep 1
$t test `$(APP)/tmp/bin/$(APP)_release.cmd rpcterms test test` = new

$i "Stop the release"
$t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd stop $v
$t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd uninstall $v
else
$i "Upgrade running release"
$t $(APP)/tmp/bin/$(APP)_release upgrade "2/$(APP)_release" $v
# $t $(APP)/tmp/bin/$(APP)_release unpack "2"
# $t sleep 1
$t $(APP)/tmp/bin/$(APP)_release upgrade "2"
$t sleep 1
$t test `$(APP)/tmp/bin/$(APP)_release rpcterms test test` = new
endif

# works with relx-3.22.4
# $i "Check that it's 2 avalible versions"
# ifeq ($(PLATFORM),msys2)
# $t test `$(APP)/tmp/bin/$(APP)_release.cmd versions |wc -l` = "3"
# else
# $t test `$(APP)/tmp/bin/$(APP)_release versions |wc -l` = "3"
# endif

$i "Downgrade the release and confirm it runs the old code"
ifeq ($(PLATFORM),msys2)
$t $(APP)/tmp/bin/$(APP)_release.cmd downgrade "1"
$t sleep 1
$t test `$(APP)/tmp/bin/$(APP)_release.cmd rpcterms test test` = old
else
$i "Downgrade running release"
$t $(APP)/tmp/bin/$(APP)_release downgrade "1"
$t sleep 1
$t test `$(APP)/tmp/bin/$(APP)_release rpcterms test test` = old
endif

$i "Stop the release"
ifeq ($(PLATFORM),msys2)
$t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd stop $v
$t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd uninstall $v
else
$t $(APP)/_rel/$(APP)_release/bin/$(APP)_release stop $v
endif


relx-start-stop: build clean

$i "Bootstrap a new release named $(APP)"
Expand Down

0 comments on commit 929de48

Please sign in to comment.