From 989edff55111db3b457c9e04f3abf296e6ac555c Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 20 Oct 2013 21:55:01 +0200 Subject: o Getting "upgrade" to work with non-SNAPSHOT versions too. o Removing maven.version. o Documenting(!) the different configuration keys and what they mean. --- bin/app-upgrade | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'bin/app-upgrade') diff --git a/bin/app-upgrade b/bin/app-upgrade index c6cd414..3c5f8dc 100755 --- a/bin/app-upgrade +++ b/bin/app-upgrade @@ -22,7 +22,7 @@ assert_is_app resolver_name=`app-conf get app.resolver` resolver=`find_resolver "$resolver_name"` -old_version=`app-conf get app.version` +old_version=`app-conf get app.resolved_version` echo "Resolving version $old_version" "$resolver" resolve-version new_version=`app-conf get app.resolved_version` @@ -35,6 +35,24 @@ fi echo "Resolved version to $new_version" +if [ "$new_version" = "" ] +then + new_version=`app-conf get app.resolved_version` +fi + +if [ "$new_version" = "" ] +then + fatal "app.resolved_version is not set." +fi + +installed_version=`app-conf get app.installed_version` + +if [ "$new_version" = "$installed_version" ] +then + echo "$new_version is already installed" + exit 0 +fi + "$resolver" download-version -v "$new_version" -f .app/latest.zip app-install-file -v "$new_version" -f .app/latest.zip -- cgit v1.2.3