Skip to content

Commit

Permalink
build: improve support for custom builds
Browse files Browse the repository at this point in the history
Add a counter field to RELEASE, just before the date, and fix it at zero.
This allows custom package builds to override it in a way that sorts before
the official packages.

Example:

  Official release:   1.6.0-0.20160120.<githash>
  Custom release 1:   1.6.0-1.avi.20160121.<githash>
  Custom release 2:   1.6.0-2.avi.20160122.<githash>

The counter (0/1/2) ensures that the build number dominates over the date
when sorting.

Message-Id: <20170122102814.19649-1-avi@scylladb.com>
  • Loading branch information
avikivity authored and penberg committed Jan 22, 2017
1 parent 1be9c23 commit 31c8e68
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SCYLLA-VERSION-GEN
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ else
DATE=$(date +%Y%m%d)
GIT_COMMIT=$(git log --pretty=format:'%h' -n 1)
SCYLLA_VERSION=$VERSION
SCYLLA_RELEASE=$DATE.$GIT_COMMIT
# For custom package builds, replace "0" with "counter.your_name",
# where counter starts at 1 and increments for successive versions.
# This ensures that the package manager will select your custom
# package over the standard release.
SCYLLA_BUILD=0
SCYLLA_RELEASE=$SCYLLA_BUILD.$DATE.$GIT_COMMIT
fi

echo "$SCYLLA_VERSION-$SCYLLA_RELEASE"
Expand Down

0 comments on commit 31c8e68

Please sign in to comment.