Skip to content

Commit

Permalink
Fix release number generation
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Perina <mperina@redhat.com>
  • Loading branch information
mwperina committed Apr 29, 2024
1 parent 81463c4 commit f499fb1
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions build-scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Current version of BlueChi
VERSION=0.8.0
# Specify if build is a official release or a snapshot build
IS_RELEASE=false
IS_RELEASE="0"
# Used for official releases. Increment if necessary
RELEASE="1"
# Used to cache generated snapshot release for further usage
Expand All @@ -23,16 +23,10 @@ function long(){

function release(){
# Package release

if [ $IS_RELEASE = false ]; then
# Used for nightly builds
if [ -f "${RELEASE_FILE}" ]; then
RELEASE="$(cat ${RELEASE_FILE})"
else
RELEASE="0.$(date +%04Y%02m%02d%02H%02M).git$(git rev-parse --short ${GITHUB_SHA:-HEAD})"
echo ${RELEASE} > ${RELEASE_FILE}
fi
if [ $IS_RELEASE == "0" ]; then
RELEASE="0.$(date +%04Y%02m%02d%02H%02M).git$(git rev-parse --short ${GITHUB_SHA:-HEAD})"
fi
echo ${RELEASE} > ${RELEASE_FILE}
echo $RELEASE
}

Expand Down

0 comments on commit f499fb1

Please sign in to comment.