diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-04-20 21:26:52 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-04-20 21:26:52 +0200 |
commit | 875716dc48cd5c485d2342c9e5bb1d461bc64b6d (patch) | |
tree | e8429406bfb43f593008375b673c6669c72f32f2 /libexec | |
parent | 32826f3c989e63f53510a9bdccd1855a9ae00636 (diff) | |
download | app.sh-875716dc48cd5c485d2342c9e5bb1d461bc64b6d.tar.gz app.sh-875716dc48cd5c485d2342c9e5bb1d461bc64b6d.tar.bz2 app.sh-875716dc48cd5c485d2342c9e5bb1d461bc64b6d.tar.xz app.sh-875716dc48cd5c485d2342c9e5bb1d461bc64b6d.zip |
o Making the resolvers use app.resolved_version instead of app.version.
o Making set-version update app.version.
Diffstat (limited to 'libexec')
-rwxr-xr-x | libexec/app-resolver-file | 2 | ||||
-rwxr-xr-x | libexec/app-resolver-maven | 8 | ||||
-rwxr-xr-x | libexec/app-set-version | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/libexec/app-resolver-file b/libexec/app-resolver-file index 6282b83..b41ca47 100755 --- a/libexec/app-resolver-file +++ b/libexec/app-resolver-file @@ -44,7 +44,7 @@ resolve_version() { local s=$(stat -c %Z $path) - app-conf set app.version "$s" + app-conf set app.resolved_version "$s" } download_version() { diff --git a/libexec/app-resolver-maven b/libexec/app-resolver-maven index deb1e7a..72aa15b 100755 --- a/libexec/app-resolver-maven +++ b/libexec/app-resolver-maven @@ -91,7 +91,7 @@ resolve_version() { if [[ ! $version == *-SNAPSHOT ]] then - app-conf set app.version "$version" + app-conf set app.resolved_version "$version" exit 0 fi @@ -116,7 +116,7 @@ resolve_snapshot() { local r=$repo/$base_path/maven-metadata.xml get $r $l - x=$(xmlstarlet sel -t -m '/metadata/versioning/snapshot' -v "timestamp|buildNumber" $l) + x=$(xmlstarlet sel -t -m '/metadata/versioning/snapshot' -v timestamp -o ' ' -v buildNumber $l) set -- $x if [[ $# != 2 ]] @@ -133,7 +133,7 @@ resolve_snapshot() { fi app-conf set maven.snapshotVersion "$snapshot_version" - app-conf set app.version "${version%-SNAPSHOT}-$snapshot_version" + app-conf set app.resolved_version "${version%-SNAPSHOT}-$snapshot_version" } download_version() { @@ -200,7 +200,7 @@ init() { if [[ $# != 3 || $1 == "" || $2 == "" || $3 == "" ]] then - fatal "Invalid Maven coordinates: $coordinates" + usage "Invalid Maven coordinates: $coordinates" fi group_id=$1 diff --git a/libexec/app-set-version b/libexec/app-set-version index 75d44a8..4c8e797 100755 --- a/libexec/app-set-version +++ b/libexec/app-set-version @@ -48,3 +48,5 @@ else echo "Creating current symlink for version $version" ln -s versions/$version/root current fi + +app-conf set app.version "$version" |