aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-04-20 21:26:52 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-04-20 21:26:52 +0200
commit875716dc48cd5c485d2342c9e5bb1d461bc64b6d (patch)
treee8429406bfb43f593008375b673c6669c72f32f2 /libexec
parent32826f3c989e63f53510a9bdccd1855a9ae00636 (diff)
downloadapp.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-xlibexec/app-resolver-file2
-rwxr-xr-xlibexec/app-resolver-maven8
-rwxr-xr-xlibexec/app-set-version2
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"