From 5d39102512da03c14175ba84b62c35367c14a463 Mon Sep 17 00:00:00 2001 From: zimbora Date: Mon, 5 Aug 2024 16:45:27 +0100 Subject: [PATCH 1/3] adapt the build system to support other GitHub users and repositories --- .github/workflows/build.yml | 16 ++++++++++ build.sh | 21 ++++++++++---- .../docker/Dockerfile.dsw-linux-arm64-wallet | 15 ++++++---- .../docker/Dockerfile.dsw-linux-x64-wallet | 15 ++++++---- .../docker/Dockerfile.dsw-macos-x64-wallet | 15 ++++++---- .../docker/Dockerfile.dsw-windows-x64-wallet | 29 +++++++++++-------- 6 files changed, 79 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62fad7836..f7456de79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,12 +17,15 @@ jobs: run: | # Extract the name of the repository and use it as the ticker value REPO_NAME="${GITHUB_REPOSITORY##*/}" + # Extract the name of the repository owner and use it as the github user + ACCOUNT_NAME="${GITHUB_REPOSITORY%/*}" # Get the short name of the ref (strip 'refs/heads/', 'refs/tags/', etc.) SHORT_REF=${GITHUB_REF##*/} # Get the short commit hash SHORT_COMMIT_HASH=$(git rev-parse --short HEAD) # Set environment variables echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV + echo "ACCOUNT_NAME=${ACCOUNT_NAME}" >> $GITHUB_ENV echo "SHORT_REF=${SHORT_REF}" >> $GITHUB_ENV echo "IMAGE_NAME=linux-x64-build-img-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV echo "CONTAINER_NAME=linux-x64-build-ctn-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV @@ -40,6 +43,7 @@ jobs: --build-arg NAME=__Decenomy__ \ --build-arg BASE_NAME=__decenomy__ \ --build-arg TARGET=$SHORT_REF \ + --build-arg GITHUB_USER=$ACCOUNT_NAME \ -t ${IMAGE_NAME} \ -f contrib/docker/Dockerfile.dsw-linux-x64-wallet . @@ -76,12 +80,15 @@ jobs: run: | # Extract the name of the repository and use it as the ticker value REPO_NAME="${GITHUB_REPOSITORY##*/}" + # Extract the name of the repository owner and use it as the github user + ACCOUNT_NAME="${GITHUB_REPOSITORY%/*}" # Get the short name of the ref (strip 'refs/heads/', 'refs/tags/', etc.) SHORT_REF=${GITHUB_REF##*/} # Get the short commit hash SHORT_COMMIT_HASH=$(git rev-parse --short HEAD) # Set environment variables echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV + echo "ACCOUNT_NAME=${ACCOUNT_NAME}" >> $GITHUB_ENV echo "SHORT_REF=${SHORT_REF}" >> $GITHUB_ENV echo "IMAGE_NAME=linux-arm64-build-img-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV echo "CONTAINER_NAME=linux-arm64-build-ctn-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV @@ -99,6 +106,7 @@ jobs: --build-arg NAME=__Decenomy__ \ --build-arg BASE_NAME=__decenomy__ \ --build-arg TARGET=$SHORT_REF \ + --build-arg GITHUB_USER=$ACCOUNT_NAME \ -t ${IMAGE_NAME} \ -f contrib/docker/Dockerfile.dsw-linux-arm64-wallet . @@ -135,12 +143,15 @@ jobs: run: | # Extract the name of the repository and use it as the ticker value REPO_NAME="${GITHUB_REPOSITORY##*/}" + # Extract the name of the repository owner and use it as the github user + ACCOUNT_NAME="${GITHUB_REPOSITORY%/*}" # Get the short name of the ref (strip 'refs/heads/', 'refs/tags/', etc.) SHORT_REF=${GITHUB_REF##*/} # Get the short commit hash SHORT_COMMIT_HASH=$(git rev-parse --short HEAD) # Set environment variables echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV + echo "ACCOUNT_NAME=${ACCOUNT_NAME}" >> $GITHUB_ENV echo "SHORT_REF=${SHORT_REF}" >> $GITHUB_ENV echo "IMAGE_NAME=windows-x64-build-img-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV echo "CONTAINER_NAME=windows-x64-build-ctn-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV @@ -158,6 +169,7 @@ jobs: --build-arg NAME=__Decenomy__ \ --build-arg BASE_NAME=__decenomy__ \ --build-arg TARGET=$SHORT_REF \ + --build-arg GITHUB_USER=$ACCOUNT_NAME \ -t ${IMAGE_NAME} \ -f contrib/docker/Dockerfile.dsw-windows-x64-wallet . @@ -194,12 +206,15 @@ jobs: run: | # Extract the name of the repository and use it as the ticker value REPO_NAME="${GITHUB_REPOSITORY##*/}" + # Extract the name of the repository owner and use it as the github user + ACCOUNT_NAME="${GITHUB_REPOSITORY%/*}" # Get the short name of the ref (strip 'refs/heads/', 'refs/tags/', etc.) SHORT_REF=${GITHUB_REF##*/} # Get the short commit hash SHORT_COMMIT_HASH=$(git rev-parse --short HEAD) # Set environment variables echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV + echo "ACCOUNT_NAME=${ACCOUNT_NAME}" >> $GITHUB_ENV echo "SHORT_REF=${SHORT_REF}" >> $GITHUB_ENV echo "IMAGE_NAME=macos-x64-build-img-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV echo "CONTAINER_NAME=macos-x64-build-ctn-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV @@ -217,6 +232,7 @@ jobs: --build-arg NAME=__Decenomy__ \ --build-arg BASE_NAME=__decenomy__ \ --build-arg TARGET=$SHORT_REF \ + --build-arg GITHUB_USER=$ACCOUNT_NAME \ -t ${IMAGE_NAME} \ -f contrib/docker/Dockerfile.dsw-macos-x64-wallet . diff --git a/build.sh b/build.sh index 0f43f4983..5f433fb77 100755 --- a/build.sh +++ b/build.sh @@ -11,15 +11,26 @@ CPU_CORES=${CPU_CORES:-""} # windows-x64 ARCHITECTURE=${ARCHITECTURE:-""} +# Get the origin URL +ORIGIN_URL=$(git config --get remote.origin.url) + +# Extract the github username and repository name +if [[ $ORIGIN_URL =~ ^https://github.com/(.+)/(.+)\.git$ ]]; then + GITHUB_USER="${BASH_REMATCH[1]}" + GITHUB_REPO="${BASH_REMATCH[2]}" +elif [[ $ORIGIN_URL =~ ^git@github.com:(.+)/(.+)\.git$ ]]; then + GITHUB_USER="${BASH_REMATCH[1]}" + GITHUB_REPO="${BASH_REMATCH[2]}" +else + echo "Unable to parse origin URL: $ORIGIN_URL" + exit 1 +fi + # Sets variables needed for the build -TICKER=${TICKER:-"__DSW__"} +TICKER=${TICKER:-"${GITHUB_REPO}"} UI_NAME=${UI_NAME:-"__Decenomy__"} BASE_NAME=${BASE_NAME:-"__decenomy__"} -# Sets the github environment variables -GITHUB_USER="decenomy" -GITHUB_REPO="__DSW__" - # Sets the build environment variable # 0: The build will use the builder image available on docker hub # 1: The build will use a locally build image for the builder image diff --git a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet index c4402ba21..16da0ade5 100644 --- a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet @@ -9,16 +9,21 @@ ARG TICKER=__DSW__ ARG NAME=__Decenomy__ ARG BASE_NAME=__decenomy__ ARG TARGET=master +ARG GITHUB_USER=decenomy RUN sleep 30 +RUN mkdir -p ${GITHUB_USER} +# Switch to the github user directory +WORKDIR /$GITHUB_USER + # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/decenomy/$TICKER; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}; \ fi # Switch to the repository directory -WORKDIR /$TICKER +WORKDIR /${GITHUB_USER}/${TICKER} # Check out the $TARGET RUN git stash --include-untracked && \ @@ -63,9 +68,9 @@ RUN PATH=${WRAP_DIR}:${PATH} aarch64-linux-gnu-objcopy --strip-all src/$(echo $B RUN PATH=${WRAP_DIR}:${PATH} aarch64-linux-gnu-objcopy --strip-all src/$(echo $BASE_NAME)-cli RUN PATH=${WRAP_DIR}:${PATH} aarch64-linux-gnu-objcopy --strip-all src/$(echo $BASE_NAME)-tx RUN PATH=${WRAP_DIR}:${PATH} aarch64-linux-gnu-objcopy --strip-all src/qt/$(echo $BASE_NAME)-qt -RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt /$TICKER/deploy/linux-arm64 -RUN find /$TICKER/deploy/linux-arm64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/deploy/linux-arm64 +RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt /${GITHUB_USER}/${TICKER}/deploy/linux-arm64 +RUN find /${GITHUB_USER}/${TICKER}/deploy/linux-arm64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/linux-arm64 RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-Linux-arm64.zip $(echo $BASE_NAME)d $(echo $BASE_NAME)-cli $(echo $BASE_NAME)-tx $(echo $BASE_NAME)-qt RUN echo "$(git rev-parse HEAD) commit" >> SHA256SUMS-Linux-arm64.ASC RUN sha256sum $(echo $BASE_NAME)d >> SHA256SUMS-Linux-arm64.ASC diff --git a/contrib/docker/Dockerfile.dsw-linux-x64-wallet b/contrib/docker/Dockerfile.dsw-linux-x64-wallet index 7fed396f3..a83ede5c1 100644 --- a/contrib/docker/Dockerfile.dsw-linux-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-x64-wallet @@ -10,16 +10,21 @@ ARG TICKER=__DSW__ ARG NAME=__Decenomy__ ARG BASE_NAME=__decenomy__ ARG TARGET=master +ARG GITHUB_USER=decenomy RUN sleep 30 +RUN mkdir -p ${GITHUB_USER} +# Switch to the github user directory +WORKDIR /$GITHUB_USER + # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/decenomy/$TICKER; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}; \ fi # Switch to the repository directory -WORKDIR /$TICKER +WORKDIR /${GITHUB_USER}/${TICKER} # Check out the $TARGET RUN git stash --include-untracked && \ @@ -61,9 +66,9 @@ RUN grep "define(_CLIENT_VERSION_BUILD" configure.ac | awk -F"[ ,)]" '{print $3} # Create deploy files RUN mkdir -p deploy/linux-x64 RUN PATH=${WRAP_DIR}:${PATH} strip -s src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt -RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt /$TICKER/deploy/linux-x64 -RUN find /$TICKER/deploy/linux-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/deploy/linux-x64 +RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt /${GITHUB_USER}/${TICKER}/deploy/linux-x64 +RUN find /${GITHUB_USER}/${TICKER}/deploy/linux-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/linux-x64 RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-Linux-x64.zip $(echo $BASE_NAME)d $(echo $BASE_NAME)-cli $(echo $BASE_NAME)-tx $(echo $BASE_NAME)-qt RUN echo "$(git rev-parse HEAD) commit" >> SHA256SUMS-Linux-x64.ASC RUN sha256sum $(echo $BASE_NAME)d >> SHA256SUMS-Linux-x64.ASC diff --git a/contrib/docker/Dockerfile.dsw-macos-x64-wallet b/contrib/docker/Dockerfile.dsw-macos-x64-wallet index e5343bbff..f52497261 100644 --- a/contrib/docker/Dockerfile.dsw-macos-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-macos-x64-wallet @@ -9,16 +9,21 @@ ARG TICKER=__DSW__ ARG NAME=__Decenomy__ ARG BASE_NAME=__decenomy__ ARG TARGET=master +ARG GITHUB_USER=decenomy RUN sleep 30 +RUN mkdir -p ${GITHUB_USER} +# Switch to the github user directory +WORKDIR /$GITHUB_USER + # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/decenomy/$TICKER; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}; \ fi # Switch to the repository directory -WORKDIR /$TICKER +WORKDIR /${GITHUB_USER}/${TICKER} # Check out the $TARGET RUN git stash --include-untracked && \ @@ -65,9 +70,9 @@ RUN PATH=${WRAP_DIR}:/DSW/depends/x86_64-apple-darwin14/native/bin/:${PATH} \ # Create deploy files RUN mkdir -p deploy/macos-x64 -RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt $(echo $NAME)-Core.dmg /$TICKER/deploy/macos-x64 -RUN find /$TICKER/deploy/macos-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/deploy/macos-x64 +RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt $(echo $NAME)-Core.dmg /${GITHUB_USER}/${TICKER}/deploy/macos-x64 +RUN find /${GITHUB_USER}/${TICKER}/deploy/macos-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/macos-x64 RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-MacOS-x64.zip $(echo $BASE_NAME)d $(echo $BASE_NAME)-cli $(echo $BASE_NAME)-tx $(echo $BASE_NAME)-qt $(echo $NAME)-Core.dmg RUN echo "$(git rev-parse HEAD) commit" >> SHA256SUMS-MacOS-x64.ASC RUN sha256sum $(echo $BASE_NAME)d >> SHA256SUMS-MacOS-x64.ASC diff --git a/contrib/docker/Dockerfile.dsw-windows-x64-wallet b/contrib/docker/Dockerfile.dsw-windows-x64-wallet index 08daee0f7..aea1c27a0 100644 --- a/contrib/docker/Dockerfile.dsw-windows-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-windows-x64-wallet @@ -9,16 +9,21 @@ ARG TICKER=__DSW__ ARG NAME=__Decenomy__ ARG BASE_NAME=__decenomy__ ARG TARGET=master +ARG GITHUB_USER=decenomy RUN sleep 30 +RUN mkdir -p ${GITHUB_USER} +# Switch to the github user directory +WORKDIR /$GITHUB_USER + # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/decenomy/$TICKER; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}; \ fi # Switch to the repository directory -WORKDIR /$TICKER +WORKDIR /${GITHUB_USER}/${TICKER} # Check out the $TARGET RUN git stash --include-untracked && \ @@ -69,10 +74,10 @@ RUN cp \ src/$(echo $BASE_NAME)-cli.exe \ src/$(echo $BASE_NAME)-tx.exe \ src/qt/$(echo $BASE_NAME)-qt.exe \ - /$TICKER/deploy/windows-x64 -RUN find /$TICKER/deploy/windows-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + + /${GITHUB_USER}/${TICKER}/deploy/windows-x64 +RUN find /${GITHUB_USER}/${TICKER}/deploy/windows-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/deploy/windows-x64 +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/windows-x64 RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-Windows-x64.zip \ $(echo $BASE_NAME)d.exe \ $(echo $BASE_NAME)-cli.exe \ @@ -87,17 +92,17 @@ RUN sha256sum $(echo $BASE_NAME)-qt.exe >> SHA256SUMS-Windows-x64.ASC RUN sha256sum $TICKER-$(cat /wallet_version)-Windows-x64.zip >> SHA256SUMS-Windows-x64.ASC # Set the Inno Setup compiler -RUN mkdir -p /$TICKER/contrib/innosetup/package -RUN cp $(echo $BASE_NAME)* /$TICKER/contrib/innosetup/package/ -RUN find /$TICKER/contrib/innosetup/ -type f -exec touch -t $(cat /git_timestamp_touch) {} + -RUN find /$TICKER/contrib/innosetup/package/ -type f -exec touch -t $(cat /git_timestamp_touch) {} + +RUN mkdir -p /${GITHUB_USER}/${TICKER}/contrib/innosetup/package +RUN cp $(echo $BASE_NAME)* /${GITHUB_USER}/${TICKER}/contrib/innosetup/package/ +RUN find /${GITHUB_USER}/${TICKER}/contrib/innosetup/ -type f -exec touch -t $(cat /git_timestamp_touch) {} + +RUN find /${GITHUB_USER}/${TICKER}/contrib/innosetup/package/ -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/contrib/innosetup +WORKDIR /${GITHUB_USER}/${TICKER}/contrib/innosetup RUN PATH=${WRAP_DIR}:${PATH} wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Inno\ Setup\ 6/ISCC.exe setup.iss -RUN mv output/$(echo $NAME)Setup.exe /$TICKER/deploy/windows-x64/$(echo $NAME)-$(cat /wallet_version)-Setup.exe +RUN mv output/$(echo $NAME)Setup.exe /${GITHUB_USER}/${TICKER}/deploy/windows-x64/$(echo $NAME)-$(cat /wallet_version)-Setup.exe -WORKDIR /$TICKER/deploy/windows-x64 +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/windows-x64 RUN touch -t $(cat /git_timestamp_touch) $(echo $NAME)-$(cat /wallet_version)-Setup.exe RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-WindowsSetup-x64.zip \ $(echo $NAME)-$(cat /wallet_version)-Setup.exe From 306fa064b4d40a64709fa4bfa6445e5015bf7115 Mon Sep 17 00:00:00 2001 From: zimbora Date: Mon, 5 Aug 2024 16:55:31 +0100 Subject: [PATCH 2/3] changes the docker cp command on build.yml --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7456de79..5627b1024 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: mkdir release_files # Copy files from the Docker container to the local filesystem - docker cp ${CONTAINER_NAME}:/$REPO_NAME/deploy/linux-x64 release_files/ + docker cp ${CONTAINER_NAME}:/$ACCOUNT_NAME/$REPO_NAME/deploy/linux-x64 release_files/ - name: Archive and Upload Extracted Files uses: actions/upload-artifact@v4 @@ -117,7 +117,7 @@ jobs: mkdir release_files # Copy files from the Docker container to the local filesystem - docker cp ${CONTAINER_NAME}:/$REPO_NAME/deploy/linux-arm64 release_files/ + docker cp ${CONTAINER_NAME}:/$ACCOUNT_NAME/$REPO_NAME/deploy/linux-arm64 release_files/ - name: Archive and Upload Extracted Files uses: actions/upload-artifact@v4 @@ -180,7 +180,7 @@ jobs: mkdir release_files # Copy files from the Docker container to the local filesystem - docker cp ${CONTAINER_NAME}:/$REPO_NAME/deploy/windows-x64 release_files/ + docker cp ${CONTAINER_NAME}:/$ACCOUNT_NAME/$REPO_NAME/deploy/windows-x64 release_files/ - name: Archive and Upload Extracted Files uses: actions/upload-artifact@v4 @@ -243,7 +243,7 @@ jobs: mkdir release_files # Copy files from the Docker container to the local filesystem - docker cp ${CONTAINER_NAME}:/$REPO_NAME/deploy/macos-x64 release_files/ + docker cp ${CONTAINER_NAME}:/$ACCOUNT_NAME/$REPO_NAME/deploy/macos-x64 release_files/ - name: Archive and Upload Extracted Files uses: actions/upload-artifact@v4 From f3daf941c4ef808e125a825acd3085a33f9631a2 Mon Sep 17 00:00:00 2001 From: zimbora Date: Mon, 5 Aug 2024 20:51:26 +0100 Subject: [PATCH 3/3] build.sh: uses GITHUB_USER Dockerfile: adds ".git" --- build.sh | 3 ++- contrib/docker/Dockerfile.dsw-linux-arm64-wallet | 2 +- contrib/docker/Dockerfile.dsw-linux-x64-wallet | 2 +- contrib/docker/Dockerfile.dsw-macos-x64-wallet | 2 +- contrib/docker/Dockerfile.dsw-windows-x64-wallet | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 5f433fb77..057bc7251 100755 --- a/build.sh +++ b/build.sh @@ -238,6 +238,7 @@ docker buildx build \ --build-arg NAME=$UI_NAME \ --build-arg BASE_NAME=$BASE_NAME \ --build-arg TARGET=$TARGET \ + --build-arg GITHUB_USER=$GITHUB_USER \ -f $WALLET_DOCKER_FILE.tmp \ -t $image_tag \ . @@ -257,7 +258,7 @@ trace "Container ID: $container_id" # Copy files from the container to the current directory mkdir -p deploy rm -rf deploy/$ARCHITECTURE -docker cp "$container_id":/${TICKER}/deploy/. ./deploy/ +docker cp "$container_id":/${GITHUB_USER}/${TICKER}/deploy/. ./deploy/ # Main verification process if [ "$VERIFY" -ge 1 ]; then diff --git a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet index 16da0ade5..a951120fa 100644 --- a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet @@ -19,7 +19,7 @@ WORKDIR /$GITHUB_USER # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/${GITHUB_USER}/${TICKER}; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}.git; \ fi # Switch to the repository directory diff --git a/contrib/docker/Dockerfile.dsw-linux-x64-wallet b/contrib/docker/Dockerfile.dsw-linux-x64-wallet index a83ede5c1..f97971f96 100644 --- a/contrib/docker/Dockerfile.dsw-linux-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-x64-wallet @@ -20,7 +20,7 @@ WORKDIR /$GITHUB_USER # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/${GITHUB_USER}/${TICKER}; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}.git; \ fi # Switch to the repository directory diff --git a/contrib/docker/Dockerfile.dsw-macos-x64-wallet b/contrib/docker/Dockerfile.dsw-macos-x64-wallet index f52497261..35d16635c 100644 --- a/contrib/docker/Dockerfile.dsw-macos-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-macos-x64-wallet @@ -19,7 +19,7 @@ WORKDIR /$GITHUB_USER # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/${GITHUB_USER}/${TICKER}; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}.git; \ fi # Switch to the repository directory diff --git a/contrib/docker/Dockerfile.dsw-windows-x64-wallet b/contrib/docker/Dockerfile.dsw-windows-x64-wallet index aea1c27a0..87914f42f 100644 --- a/contrib/docker/Dockerfile.dsw-windows-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-windows-x64-wallet @@ -19,7 +19,7 @@ WORKDIR /$GITHUB_USER # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/${GITHUB_USER}/${TICKER}; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}.git; \ fi # Switch to the repository directory