aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-04-21 11:00:10 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-04-21 11:00:10 +0200
commitc8a9de50c8f7254c61888982ae270bf71c3f8506 (patch)
tree9cd20247043819d932ba2920f6b500db0315dc04
parentcb9eea1db0715cc8c944f54e61270d25502e3163 (diff)
downloadapp.sh-c8a9de50c8f7254c61888982ae270bf71c3f8506.tar.gz
app.sh-c8a9de50c8f7254c61888982ae270bf71c3f8506.tar.bz2
app.sh-c8a9de50c8f7254c61888982ae270bf71c3f8506.tar.xz
app.sh-c8a9de50c8f7254c61888982ae270bf71c3f8506.zip
o Making the file resolver useful.
-rwxr-xr-xbin/app-upgrade2
-rwxr-xr-xlibexec/app-resolver-file2
-rwxr-xr-xtest/app-upgrade.bats5
3 files changed, 5 insertions, 4 deletions
diff --git a/bin/app-upgrade b/bin/app-upgrade
index 2ca84e0..c6cd414 100755
--- a/bin/app-upgrade
+++ b/bin/app-upgrade
@@ -25,7 +25,7 @@ resolver=`find_resolver "$resolver_name"`
old_version=`app-conf get app.version`
echo "Resolving version $old_version"
"$resolver" resolve-version
-new_version=`app-conf get app.version`
+new_version=`app-conf get app.resolved_version`
if [[ $new_version == $old_version ]]
then
diff --git a/libexec/app-resolver-file b/libexec/app-resolver-file
index b41ca47..500b3a0 100755
--- a/libexec/app-resolver-file
+++ b/libexec/app-resolver-file
@@ -71,7 +71,7 @@ download_version() {
path=$(app-conf get file.path)
- ln -s "$path" "$target"
+ ln -f -s "$path" "$target"
}
command="$1"; shift
diff --git a/test/app-upgrade.bats b/test/app-upgrade.bats
index 2dde851..5d79260 100755
--- a/test/app-upgrade.bats
+++ b/test/app-upgrade.bats
@@ -14,17 +14,18 @@ load utils
app conf get maven.version
match '${lines[0]}' "1.0-SNAPSHOT"
maven_version="${lines[0]}"
- describe maven_version=$maven_version
app conf get app.version
match '${lines[0]}' "1.0-.*"
app_version="${lines[0]}"
- describe app_version=$app_version
app conf get app.resolved_version
match '${lines[0]}' "1.0-.*"
eq '${lines[0]}' "$app_version"
resolved_version="${lines[0]}"
+
+ describe maven_version=$maven_version
+ describe app_version=$app_version
describe resolved_version=$resolved_version
install_artifact