diff options
author | Loïc Hoguin <[email protected]> | 2023-05-12 14:34:44 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2023-05-12 14:34:44 +0200 |
commit | d72f07d1270badb3dd8b2267597f5416e9462780 (patch) | |
tree | 5b34e36533f5315c6b961fafb5aa4bfdb782ba5e /test | |
parent | 3396e17fa89489e5a4f9a7744c9185102bdda821 (diff) | |
download | erlang.mk-d72f07d1270badb3dd8b2267597f5416e9462780.tar.gz erlang.mk-d72f07d1270badb3dd8b2267597f5416e9462780.tar.bz2 erlang.mk-d72f07d1270badb3dd8b2267597f5416e9462780.zip |
Add tests for Relx' {git, short} && {git, long}
Diffstat (limited to 'test')
-rw-r--r-- | test/plugin_relx.mk | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/test/plugin_relx.mk b/test/plugin_relx.mk index 554b292..15a54b8 100644 --- a/test/plugin_relx.mk +++ b/test/plugin_relx.mk @@ -332,7 +332,7 @@ relx-tar: init $i "Check that tarball exists" $t test -f $(APP)/_rel/$(APP)_release/$(APP)_release-1.tar.gz -relx-vsn: init +relx-vsn-cmd: init $i "Bootstrap a new release named $(APP)" $t mkdir $(APP)/ @@ -348,3 +348,37 @@ relx-vsn: init $i "Check that the correct release exists" $t ! test -d $(APP)/_rel/$(APP)_release/releases/1 $t test -d $(APP)/_rel/$(APP)_release/releases/2 + +relx-vsn-git-long: init + + $i "Bootstrap a new release named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap bootstrap-rel $v + + $i "Replace the vsn" + $t sed -i.bak s/"\"1\""/"{git, long}"/ $(APP)/relx.config + + $i "Build the release" + $t $(MAKE) -C $(APP) $v + + $i "Check that the correct release exists" + $t ! test -d $(APP)/_rel/$(APP)_release/releases/1 + $t test -d $(APP)/_rel/$(APP)_release/releases/$(shell git rev-parse HEAD) + +relx-vsn-git-short: init + + $i "Bootstrap a new release named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap bootstrap-rel $v + + $i "Replace the vsn" + $t sed -i.bak s/"\"1\""/"{git, short}"/ $(APP)/relx.config + + $i "Build the release" + $t $(MAKE) -C $(APP) $v + + $i "Check that the correct release exists" + $t ! test -d $(APP)/_rel/$(APP)_release/releases/1 + $t test -d $(APP)/_rel/$(APP)_release/releases/$(shell git rev-parse --short HEAD) |