Skip to content

Commit

Permalink
HPCC-30610 Update build scripts to set tag timestamp
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Oct 25, 2023
1 parent 5161525 commit 0f3523d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake_modules/parse_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ function update_version_file()
local _new_sequence=$3
local _new_minor=$4
local _new_major=$5
local _new_timestamp=$(date -u "+%Y-%m-%dT%H:%M:%SZ")

if [ -z "$_new_minor" ] ; then
_new_minor=$HPCC_MINOR
fi
Expand All @@ -152,6 +154,7 @@ function update_version_file()
-e "\"s/HPCC_POINT +$HPCC_POINT *\)/HPCC_POINT $_new_point )/\"" \
-e "\"s/HPCC_SEQUENCE +$HPCC_SEQUENCE *\)/HPCC_SEQUENCE $_new_sequence )/\"" \
-e "\"s/HPCC_MATURITY +\"$HPCC_MATURITY\" *\)/HPCC_MATURITY \"$_new_maturity\" )/\"" \
-e "\"s/HPCC_TAG_TIMESTAMP.*\)/HPCC_TAG_TIMESTAMP \"$_new_timestamp\" )/\"" \
-i.bak $VERSIONFILE
fi
if [ -z "$DRYRUN" ] ; then
Expand All @@ -161,6 +164,7 @@ function update_version_file()
-e "s/HPCC_POINT +$HPCC_POINT *\)/HPCC_POINT $_new_point )/" \
-e "s/HPCC_SEQUENCE +$HPCC_SEQUENCE *\)/HPCC_SEQUENCE $_new_sequence )/" \
-e "s/HPCC_MATURITY +\"$HPCC_MATURITY\" *\)/HPCC_MATURITY \"$_new_maturity\" )/" \
-e "s/HPCC_TAG_TIMESTAMP.*\)/HPCC_TAG_TIMESTAMP \"$_new_timestamp\" )/" \
-i.bak $VERSIONFILE
cat $VERSIONFILE
else
Expand All @@ -170,6 +174,7 @@ function update_version_file()
-e "s/HPCC_POINT +$HPCC_POINT *\)/HPCC_POINT $_new_point )/" \
-e "s/HPCC_SEQUENCE +$HPCC_SEQUENCE *\)/HPCC_SEQUENCE $_new_sequence )/" \
-e "s/HPCC_MATURITY +\"$HPCC_MATURITY\" *\)/HPCC_MATURITY \"$_new_maturity\" )/" \
-e "s/HPCC_TAG_TIMESTAMP.*\)/HPCC_TAG_TIMESTAMP \"$_new_timestamp\" )/" \
$VERSIONFILE
fi
}
Expand Down

0 comments on commit 0f3523d

Please sign in to comment.