From 9cc24a2c56f853a3c6f54ef96f856d81a991c2fd Mon Sep 17 00:00:00 2001 From: t1amak Date: Fri, 14 Nov 2025 21:45:27 +0000 Subject: [PATCH] ignore tags 3 --- scripts/release/linux_x64/build.sh | 7 ++++++- scripts/release/linux_x64/p2pool_linux_x64.sh | 1 + scripts/release/macos_aarch64/Dockerfile | 2 ++ scripts/release/macos_aarch64/build.sh | 7 ++++++- scripts/release/macos_aarch64/p2pool_macos_aarch64.sh | 4 +++- scripts/release/windows_x64/Dockerfile | 2 ++ scripts/release/windows_x64/build.sh | 7 ++++++- scripts/release/windows_x64/p2pool_windows_x64.sh | 4 +++- 8 files changed, 29 insertions(+), 5 deletions(-) diff --git a/scripts/release/linux_x64/build.sh b/scripts/release/linux_x64/build.sh index 0156276..f2cf63d 100755 --- a/scripts/release/linux_x64/build.sh +++ b/scripts/release/linux_x64/build.sh @@ -6,6 +6,7 @@ set -eu cd "$(dirname "$0")" repo_root="$(cd ../../.. && pwd)" +checkout_ref="$(git -C "$repo_root" rev-parse HEAD)" if [ "${2:-}" ]; then cpu_set="--cpuset-cpus $2" @@ -13,7 +14,11 @@ else cpu_set="" fi -docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_linux_x64_build_$1 -f Dockerfile "$repo_root" +docker build $cpu_set \ + --build-arg P2POOL_VERSION=$1 \ + --build-arg P2POOL_CHECKOUT=$checkout_ref \ + -t p2pool_linux_x64_build_$1 \ + -f Dockerfile "$repo_root" docker create --name p2pool_linux_x64_build_$1_container p2pool_linux_x64_build_$1:latest docker cp p2pool_linux_x64_build_$1_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 fc4f3e1..5232418 100755 --- a/scripts/release/linux_x64/p2pool_linux_x64.sh +++ b/scripts/release/linux_x64/p2pool_linux_x64.sh @@ -4,6 +4,7 @@ set -e cd /p2pool git fetch --jobs=$(nproc) CHECKOUT_REF=${P2POOL_CHECKOUT:-$2} +echo "Checking out ${CHECKOUT_REF} (version label $2)" git checkout "$CHECKOUT_REF" git submodule update --recursive --jobs $(nproc) diff --git a/scripts/release/macos_aarch64/Dockerfile b/scripts/release/macos_aarch64/Dockerfile index b6e1763..ee27fc5 100644 --- a/scripts/release/macos_aarch64/Dockerfile +++ b/scripts/release/macos_aarch64/Dockerfile @@ -1,4 +1,6 @@ FROM p2pool_build_ubuntu ARG P2POOL_VERSION +ARG P2POOL_CHECKOUT +ENV P2POOL_CHECKOUT=${P2POOL_CHECKOUT} ADD . /p2pool/ RUN /p2pool/scripts/release/macos_aarch64/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 103cd2f..cfeaddd 100755 --- a/scripts/release/macos_aarch64/build.sh +++ b/scripts/release/macos_aarch64/build.sh @@ -6,6 +6,7 @@ set -eu cd "$(dirname "$0")" repo_root="$(cd ../../.. && pwd)" +checkout_ref="$(git -C "$repo_root" rev-parse HEAD)" if [ "${2:-}" ]; then cpu_set="--cpuset-cpus $2" @@ -13,7 +14,11 @@ else cpu_set="" fi -docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_macos_aarch64_build_$1 -f Dockerfile "$repo_root" +docker build $cpu_set \ + --build-arg P2POOL_VERSION=$1 \ + --build-arg P2POOL_CHECKOUT=$checkout_ref \ + -t p2pool_macos_aarch64_build_$1 \ + -f Dockerfile "$repo_root" docker create --name p2pool_macos_aarch64_build_$1_container p2pool_macos_aarch64_build_$1:latest docker cp p2pool_macos_aarch64_build_$1_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 2f526ab..b467bf1 100755 --- a/scripts/release/macos_aarch64/p2pool_macos_aarch64.sh +++ b/scripts/release/macos_aarch64/p2pool_macos_aarch64.sh @@ -3,7 +3,9 @@ set -e cd /p2pool git fetch --jobs=$(nproc) -git checkout $2 +CHECKOUT_REF=${P2POOL_CHECKOUT:-$2} +echo "Checking out ${CHECKOUT_REF} (version label $2)" +git checkout "$CHECKOUT_REF" git submodule update --recursive --jobs $(nproc) export TZ=UTC0 diff --git a/scripts/release/windows_x64/Dockerfile b/scripts/release/windows_x64/Dockerfile index 029f574..a74e189 100644 --- a/scripts/release/windows_x64/Dockerfile +++ b/scripts/release/windows_x64/Dockerfile @@ -1,4 +1,6 @@ FROM p2pool_build_ubuntu ARG P2POOL_VERSION +ARG P2POOL_CHECKOUT +ENV P2POOL_CHECKOUT=${P2POOL_CHECKOUT} ADD . /p2pool/ RUN /p2pool/scripts/release/windows_x64/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 a476df0..fdccee5 100755 --- a/scripts/release/windows_x64/build.sh +++ b/scripts/release/windows_x64/build.sh @@ -6,6 +6,7 @@ set -eu cd "$(dirname "$0")" repo_root="$(cd ../../.. && pwd)" +checkout_ref="$(git -C "$repo_root" rev-parse HEAD)" if [ "${2:-}" ]; then cpu_set="--cpuset-cpus $2" @@ -13,7 +14,11 @@ else cpu_set="" fi -docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_windows_x64_build_$1 -f Dockerfile "$repo_root" +docker build $cpu_set \ + --build-arg P2POOL_VERSION=$1 \ + --build-arg P2POOL_CHECKOUT=$checkout_ref \ + -t p2pool_windows_x64_build_$1 \ + -f Dockerfile "$repo_root" docker create --name p2pool_windows_x64_build_$1_container p2pool_windows_x64_build_$1:latest docker cp p2pool_windows_x64_build_$1_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 d5cab07..54461c9 100755 --- a/scripts/release/windows_x64/p2pool_windows_x64.sh +++ b/scripts/release/windows_x64/p2pool_windows_x64.sh @@ -10,7 +10,9 @@ cp -r patches "$PATCH_TMP_ROOT/" PATCH_DIR="$PATCH_TMP_ROOT/patches" git fetch --jobs=$(nproc) -git checkout $2 +CHECKOUT_REF=${P2POOL_CHECKOUT:-$2} +echo "Checking out ${CHECKOUT_REF} (version label $2)" +git checkout "$CHECKOUT_REF" git submodule update --recursive --jobs $(nproc) export TZ=UTC0