TRAVIS: use complete version information for bintray package versions
authorTim Janik <timj@gnu.org>
Sun, 27 Mar 2016 00:54:48 +0000 (01:54 +0100)
committerTim Janik <timj@gnu.org>
Thu, 31 Mar 2016 17:19:41 +0000 (19:19 +0200)
This avoids version clashes when uploading packages build for different
distributions to bintray.com.

Signed-off-by: Tim Janik <timj@gnu.org>
buildtool.sh

index eb33007..cc35a33 100755 (executable)
@@ -42,6 +42,8 @@ mkconfig() # print shell variables describing package, version, commit id, monot
   REVISIONSUFFIX="-${REVISIONSUFFIX:-0.1local}" # avoid non-native-package-with-native-version
   test -z "$TRAVIS_JOB_NUMBER" || REVISIONSUFFIX="$REVISIONSUFFIX~travis${TRAVIS_JOB_NUMBER/*./}"
   BUILDREV="$REVISIONSUFFIX"
+  # complate deb package versioning
+  DEBVERSION="$UPSVERSION$UPSDETAIL$BUILDREV"
   # print variables after all errors have been checked for
   cat <<-__EOF
        PACKAGE=$PACKAGE
@@ -52,7 +54,7 @@ mkconfig() # print shell variables describing package, version, commit id, monot
        TOTAL_COMMITS=$TOTAL_COMMITS
        COMMITID=$COMMITID
        CHANGELOGMSG="$CHANGELOGMSG"
-       DEBVERSION=$UPSVERSION$UPSDETAIL$BUILDREV
+       DEBVERSION=$DEBVERSION
        __EOF
   popd >/dev/null                                      # cd OLDPWD
 }
@@ -68,7 +70,7 @@ bintrayup() # Usage: bintrayup <bintrayaccount> <packagepath> <packagedistributi
   test -n "$PKGDIST" || die 1 "missing distribution"
   shift 3
   # create new bintray versoin
-  REPOVERSION="$UPSVERSION$UPSDETAIL" # echo "REPOVERSION=$REPOVERSION"
+  REPOVERSION="$DEBVERSION" # echo "REPOVERSION=$REPOVERSION"
   echo "  REMOTE  " "creating new version: $REPOVERSION"
   curl -d "{ \"name\": \"$REPOVERSION\", \"released\": \"`date -I`\", \"desc\": \"Automatic CI Build\" }" \
     -u"$ACCNAME:$BINTRAY_APITOKEN" "https://api.bintray.com/packages/$ACCNAME/$PKGPATH/versions" \