Build scripts: support building from a tag/commit

This commit is contained in:
SChernykh
2025-07-05 23:13:52 +02:00
parent 758b55f354
commit 2822c6abb5
28 changed files with 69 additions and 57 deletions

View File

@@ -1,4 +1,4 @@
FROM p2pool_build_ubuntu
ARG P2POOL_VERSION BUILD_TIMESTAMP
ADD p2pool.tar p2pool_macos_x64.sh zutil.patch /p2pool/
RUN /p2pool/p2pool_macos_x64.sh p2pool-${P2POOL_VERSION}-macos-x64 ${BUILD_TIMESTAMP}
ADD p2pool_macos_x64.sh zutil.patch /p2pool/
RUN /p2pool/p2pool_macos_x64.sh p2pool-${P2POOL_VERSION}-macos-x64 ${BUILD_TIMESTAMP} ${P2POOL_VERSION}

View File

@@ -3,7 +3,6 @@
# Example usage: ./build.sh v4.8.1
cd "$(dirname "$0")"
[ ! -f "p2pool.tar" ] && tar -f p2pool.tar -c ../../cmake -c ../../external -c ../../src -c ../../CMakeLists.txt -c ../../LICENSE -c ../../README.md
docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_macos_x64_build .
@@ -12,5 +11,3 @@ docker cp p2pool_macos_x64_build_container:/p2pool/build/p2pool-$1-macos-x64.tar
docker rm p2pool_macos_x64_build_container
docker image rm -f p2pool_macos_x64_build
rm p2pool.tar

View File

@@ -1,6 +1,11 @@
#!/bin/sh
set -e
cd /p2pool
git fetch --jobs=$(nproc)
git checkout $3
git submodule update --recursive --jobs $(nproc)
export TZ=UTC0
CURRENT_DATE=$(date -u -d @$2 +"%Y-%m-%d")