Build scripts: fixed timestamp setting

This commit is contained in:
SChernykh
2025-07-07 16:17:18 +02:00
parent c5b4e84652
commit 24ac83e88b
27 changed files with 72 additions and 63 deletions

View File

@@ -3,14 +3,15 @@ set -e
cd /p2pool
git fetch --jobs=$(nproc)
git checkout $3
git checkout $2
git submodule update --recursive --jobs $(nproc)
export TZ=UTC0
CURRENT_DATE=$(date -u -d @$2 +"%Y-%m-%d")
CURRENT_TIME=$(date -u -d @$2 +"%H:%M:%S")
TOUCH_DATE=$(date -u -d @$2 +"%Y%m%d%H%M.%S")
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
flags_size=""
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"