From 0f3523dbe353176cf0854f4a4d4cc82dcae3c252 Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Tue, 24 Oct 2023 10:12:47 +0100 Subject: [PATCH] HPCC-30610 Update build scripts to set tag timestamp Signed-off-by: Gavin Halliday --- cmake_modules/parse_cmake.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake_modules/parse_cmake.sh b/cmake_modules/parse_cmake.sh index ab85a24a866..badee4cf861 100755 --- a/cmake_modules/parse_cmake.sh +++ b/cmake_modules/parse_cmake.sh @@ -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 @@ -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 @@ -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 @@ -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 }