diff --git a/scripts/release/freebsd_aarch64/Dockerfile b/scripts/release/freebsd_aarch64/Dockerfile index a7585e7..9f177cd 100644 --- a/scripts/release/freebsd_aarch64/Dockerfile +++ b/scripts/release/freebsd_aarch64/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_freebsd_aarch64.sh /p2pool/ -RUN /p2pool/p2pool_freebsd_aarch64.sh p2pool-${P2POOL_VERSION}-freebsd-aarch64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION} +RUN /p2pool/p2pool_freebsd_aarch64.sh p2pool-${P2POOL_VERSION}-freebsd-aarch64 ${P2POOL_VERSION} diff --git a/scripts/release/freebsd_aarch64/build.sh b/scripts/release/freebsd_aarch64/build.sh index b57b6c2..d0e5ceb 100755 --- a/scripts/release/freebsd_aarch64/build.sh +++ b/scripts/release/freebsd_aarch64/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_freebsd_aarch64_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_freebsd_aarch64_build . docker create --name p2pool_freebsd_aarch64_build_container p2pool_freebsd_aarch64_build:latest docker cp p2pool_freebsd_aarch64_build_container:/p2pool/build/p2pool-$1-freebsd-aarch64.tar.gz ../p2pool-$1-freebsd-aarch64.tar.gz diff --git a/scripts/release/freebsd_aarch64/p2pool_freebsd_aarch64.sh b/scripts/release/freebsd_aarch64/p2pool_freebsd_aarch64.sh index 9f23031..6c38661 100755 --- a/scripts/release/freebsd_aarch64/p2pool_freebsd_aarch64.sh +++ b/scripts/release/freebsd_aarch64/p2pool_freebsd_aarch64.sh @@ -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="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections" flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined" diff --git a/scripts/release/freebsd_x64/Dockerfile b/scripts/release/freebsd_x64/Dockerfile index d4d2a1a..898afff 100644 --- a/scripts/release/freebsd_x64/Dockerfile +++ b/scripts/release/freebsd_x64/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_freebsd_x64.sh /p2pool/ -RUN /p2pool/p2pool_freebsd_x64.sh p2pool-${P2POOL_VERSION}-freebsd-x64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION} +RUN /p2pool/p2pool_freebsd_x64.sh p2pool-${P2POOL_VERSION}-freebsd-x64 ${P2POOL_VERSION} diff --git a/scripts/release/freebsd_x64/build.sh b/scripts/release/freebsd_x64/build.sh index 86986af..131cff1 100755 --- a/scripts/release/freebsd_x64/build.sh +++ b/scripts/release/freebsd_x64/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_freebsd_x64_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_freebsd_x64_build . docker create --name p2pool_freebsd_x64_build_container p2pool_freebsd_x64_build:latest docker cp p2pool_freebsd_x64_build_container:/p2pool/build/p2pool-$1-freebsd-x64.tar.gz ../p2pool-$1-freebsd-x64.tar.gz diff --git a/scripts/release/freebsd_x64/p2pool_freebsd_x64.sh b/scripts/release/freebsd_x64/p2pool_freebsd_x64.sh index f69a007..5b9a7ee 100755 --- a/scripts/release/freebsd_x64/p2pool_freebsd_x64.sh +++ b/scripts/release/freebsd_x64/p2pool_freebsd_x64.sh @@ -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="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections" flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined" diff --git a/scripts/release/linux_aarch64/Dockerfile b/scripts/release/linux_aarch64/Dockerfile index 519324a..e44011b 100644 --- a/scripts/release/linux_aarch64/Dockerfile +++ b/scripts/release/linux_aarch64/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_linux_aarch64.sh /p2pool/ -RUN /p2pool/p2pool_linux_aarch64.sh p2pool-${P2POOL_VERSION}-linux-aarch64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION} +RUN /p2pool/p2pool_linux_aarch64.sh p2pool-${P2POOL_VERSION}-linux-aarch64 ${P2POOL_VERSION} diff --git a/scripts/release/linux_aarch64/build.sh b/scripts/release/linux_aarch64/build.sh index 02df0bb..83f3332 100755 --- a/scripts/release/linux_aarch64/build.sh +++ b/scripts/release/linux_aarch64/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_ubuntu_aarch64_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_ubuntu_aarch64_build . docker create --name p2pool_ubuntu_aarch64_build_container p2pool_ubuntu_aarch64_build:latest docker cp p2pool_ubuntu_aarch64_build_container:/p2pool/build/p2pool-$1-linux-aarch64.tar.gz ../p2pool-$1-linux-aarch64.tar.gz diff --git a/scripts/release/linux_aarch64/p2pool_linux_aarch64.sh b/scripts/release/linux_aarch64/p2pool_linux_aarch64.sh index 5d423a0..d3f0b69 100755 --- a/scripts/release/linux_aarch64/p2pool_linux_aarch64.sh +++ b/scripts/release/linux_aarch64/p2pool_linux_aarch64.sh @@ -8,9 +8,10 @@ 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="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections" flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined" diff --git a/scripts/release/linux_riscv64/Dockerfile b/scripts/release/linux_riscv64/Dockerfile index 6bf5566..12e2a00 100644 --- a/scripts/release/linux_riscv64/Dockerfile +++ b/scripts/release/linux_riscv64/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_linux_riscv64.sh /p2pool/ -RUN /p2pool/p2pool_linux_riscv64.sh p2pool-${P2POOL_VERSION}-linux-riscv64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION} +RUN /p2pool/p2pool_linux_riscv64.sh p2pool-${P2POOL_VERSION}-linux-riscv64 ${P2POOL_VERSION} diff --git a/scripts/release/linux_riscv64/build.sh b/scripts/release/linux_riscv64/build.sh index 4624d0b..810d811 100755 --- a/scripts/release/linux_riscv64/build.sh +++ b/scripts/release/linux_riscv64/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_ubuntu_riscv64_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_ubuntu_riscv64_build . docker create --name p2pool_ubuntu_riscv64_build_container p2pool_ubuntu_riscv64_build:latest docker cp p2pool_ubuntu_riscv64_build_container:/p2pool/build/p2pool-$1-linux-riscv64.tar.gz ../p2pool-$1-linux-riscv64.tar.gz diff --git a/scripts/release/linux_riscv64/p2pool_linux_riscv64.sh b/scripts/release/linux_riscv64/p2pool_linux_riscv64.sh index a08e30f..e08357e 100755 --- a/scripts/release/linux_riscv64/p2pool_linux_riscv64.sh +++ b/scripts/release/linux_riscv64/p2pool_linux_riscv64.sh @@ -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="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections" flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined" diff --git a/scripts/release/linux_x64/Dockerfile b/scripts/release/linux_x64/Dockerfile index 894be8b..75818af 100644 --- a/scripts/release/linux_x64/Dockerfile +++ b/scripts/release/linux_x64/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_linux_x64.sh /p2pool/ -RUN /p2pool/p2pool_linux_x64.sh p2pool-${P2POOL_VERSION}-linux-x64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION} +RUN /p2pool/p2pool_linux_x64.sh p2pool-${P2POOL_VERSION}-linux-x64 ${P2POOL_VERSION} diff --git a/scripts/release/linux_x64/build.sh b/scripts/release/linux_x64/build.sh index aa40f14..19a9239 100755 --- a/scripts/release/linux_x64/build.sh +++ b/scripts/release/linux_x64/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_linux_x64_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_linux_x64_build . docker create --name p2pool_linux_x64_build_container p2pool_linux_x64_build:latest docker cp p2pool_linux_x64_build_container:/p2pool/build/p2pool-$1-linux-x64.tar.gz ../p2pool-$1-linux-x64.tar.gz diff --git a/scripts/release/linux_x64/p2pool_linux_x64.sh b/scripts/release/linux_x64/p2pool_linux_x64.sh index 0498d75..445c214 100755 --- a/scripts/release/linux_x64/p2pool_linux_x64.sh +++ b/scripts/release/linux_x64/p2pool_linux_x64.sh @@ -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="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections" flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined" diff --git a/scripts/release/macos_aarch64/Dockerfile b/scripts/release/macos_aarch64/Dockerfile index 6f74ad1..873e488 100644 --- a/scripts/release/macos_aarch64/Dockerfile +++ b/scripts/release/macos_aarch64/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_macos_aarch64.sh zutil.patch /p2pool/ -RUN /p2pool/p2pool_macos_aarch64.sh p2pool-${P2POOL_VERSION}-macos-aarch64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION} +RUN /p2pool/p2pool_macos_aarch64.sh p2pool-${P2POOL_VERSION}-macos-aarch64 ${P2POOL_VERSION} diff --git a/scripts/release/macos_aarch64/build.sh b/scripts/release/macos_aarch64/build.sh index 4cadc5c..5468034 100755 --- a/scripts/release/macos_aarch64/build.sh +++ b/scripts/release/macos_aarch64/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_macos_aarch64_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_macos_aarch64_build . docker create --name p2pool_macos_aarch64_build_container p2pool_macos_aarch64_build:latest docker cp p2pool_macos_aarch64_build_container:/p2pool/build/p2pool-$1-macos-aarch64.tar.gz ../p2pool-$1-macos-aarch64.tar.gz diff --git a/scripts/release/macos_aarch64/p2pool_macos_aarch64.sh b/scripts/release/macos_aarch64/p2pool_macos_aarch64.sh index 2f4fd63..b28603b 100755 --- a/scripts/release/macos_aarch64/p2pool_macos_aarch64.sh +++ b/scripts/release/macos_aarch64/p2pool_macos_aarch64.sh @@ -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" diff --git a/scripts/release/macos_x64/Dockerfile b/scripts/release/macos_x64/Dockerfile index 4b68748..aa39010 100644 --- a/scripts/release/macos_x64/Dockerfile +++ b/scripts/release/macos_x64/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_macos_x64.sh zutil.patch /p2pool/ -RUN /p2pool/p2pool_macos_x64.sh p2pool-${P2POOL_VERSION}-macos-x64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION} +RUN /p2pool/p2pool_macos_x64.sh p2pool-${P2POOL_VERSION}-macos-x64 ${P2POOL_VERSION} diff --git a/scripts/release/macos_x64/build.sh b/scripts/release/macos_x64/build.sh index 01f5c26..3d274f0 100755 --- a/scripts/release/macos_x64/build.sh +++ b/scripts/release/macos_x64/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_macos_x64_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_macos_x64_build . docker create --name p2pool_macos_x64_build_container p2pool_macos_x64_build:latest docker cp p2pool_macos_x64_build_container:/p2pool/build/p2pool-$1-macos-x64.tar.gz ../p2pool-$1-macos-x64.tar.gz diff --git a/scripts/release/macos_x64/p2pool_macos_x64.sh b/scripts/release/macos_x64/p2pool_macos_x64.sh index b88c63c..b3ae12f 100755 --- a/scripts/release/macos_x64/p2pool_macos_x64.sh +++ b/scripts/release/macos_x64/p2pool_macos_x64.sh @@ -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" diff --git a/scripts/release/source/Dockerfile b/scripts/release/source/Dockerfile index d1e556f..5cfb278 100644 --- a/scripts/release/source/Dockerfile +++ b/scripts/release/source/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_source.sh /root -RUN /root/p2pool_source.sh ${P2POOL_VERSION} ${BUILD_TIMESTAMP} +RUN /root/p2pool_source.sh ${P2POOL_VERSION} diff --git a/scripts/release/source/build.sh b/scripts/release/source/build.sh index d7cfe20..5a41a82 100755 --- a/scripts/release/source/build.sh +++ b/scripts/release/source/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_source_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_source_build . docker create --name p2pool_source_build_container p2pool_source_build:latest docker cp p2pool_source_build_container:/p2pool_source-$1.tar.xz ../p2pool_source-$1.tar.xz diff --git a/scripts/release/source/p2pool_source.sh b/scripts/release/source/p2pool_source.sh index cf2ecc1..56e4632 100755 --- a/scripts/release/source/p2pool_source.sh +++ b/scripts/release/source/p2pool_source.sh @@ -8,9 +8,10 @@ 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 $1) +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") cd / diff --git a/scripts/release/windows_x64/Dockerfile b/scripts/release/windows_x64/Dockerfile index df6e053..cad1883 100644 --- a/scripts/release/windows_x64/Dockerfile +++ b/scripts/release/windows_x64/Dockerfile @@ -1,4 +1,4 @@ FROM p2pool_build_ubuntu -ARG P2POOL_VERSION BUILD_TIMESTAMP +ARG P2POOL_VERSION ADD p2pool_windows_x64.sh /p2pool/ -RUN /p2pool/p2pool_windows_x64.sh p2pool-${P2POOL_VERSION}-windows-x64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION} +RUN /p2pool/p2pool_windows_x64.sh p2pool-${P2POOL_VERSION}-windows-x64 ${P2POOL_VERSION} diff --git a/scripts/release/windows_x64/build.sh b/scripts/release/windows_x64/build.sh index a3ce9d0..2115c61 100755 --- a/scripts/release/windows_x64/build.sh +++ b/scripts/release/windows_x64/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" -docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_windows_x64_build . +docker build --build-arg P2POOL_VERSION=$1 -t p2pool_windows_x64_build . docker create --name p2pool_windows_x64_build_container p2pool_windows_x64_build:latest docker cp p2pool_windows_x64_build_container:/p2pool/build/p2pool-$1-windows-x64.zip ../p2pool-$1-windows-x64.zip diff --git a/scripts/release/windows_x64/p2pool_windows_x64.sh b/scripts/release/windows_x64/p2pool_windows_x64.sh index 41f8511..28071ff 100755 --- a/scripts/release/windows_x64/p2pool_windows_x64.sh +++ b/scripts/release/windows_x64/p2pool_windows_x64.sh @@ -3,21 +3,22 @@ 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="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections" flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined" -flags_libs="--target=x86_64-pc-windows-gnu -Os -flto -Wl,/timestamp:$2 -fuse-ld=lld -w $flags_size $flags_datetime" +flags_libs="--target=x86_64-pc-windows-gnu -Os -flto -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -w $flags_size $flags_datetime" -flags_p2pool="--target=x86_64-pc-windows-gnu -Wl,/timestamp:$2 -fuse-ld=lld -femulated-tls -Wno-unused-command-line-argument $flags_size $flags_datetime" +flags_p2pool="--target=x86_64-pc-windows-gnu -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -femulated-tls -Wno-unused-command-line-argument $flags_size $flags_datetime" flags_cxx_headers="-isystem /usr/local/x86_64-w64-mingw32/include/c++ -isystem /usr/local/x86_64-w64-mingw32/include/c++/15.1.0 -isystem /usr/local/x86_64-w64-mingw32/include" cd /p2pool