diff --git a/dist/build/linux-aarch64.sh b/dist/build/linux-aarch64.sh index 803349c..b9b599d 100755 --- a/dist/build/linux-aarch64.sh +++ b/dist/build/linux-aarch64.sh @@ -1,12 +1,18 @@ #!/bin/bash if [ -z "$1" ]; then - echo "Usage: $0 " + echo "Usage: $0 [branch]" exit 1 fi VERSION=$1 +if [ -z "$2" ]; then + BRANCH=$VERSION +else + BRANCH=$2 +fi + set -e # Don't fail # Create pkgs directory @@ -16,7 +22,7 @@ cd - mkdir -p ${PKGS_DIR}/ # Build aarch64_deb cd aarch64_debian9/ -docker buildx build --platform linux/arm64 --build-arg branch=${VERSION} --tag termscp-${VERSION}-aarch64_debian9 . +docker buildx build --platform linux/arm64 --no-cache --build-arg branch=${BRANCH} --tag termscp-${VERSION}-aarch64_debian9 . cd - mkdir -p ${PKGS_DIR}/deb/ mkdir -p ${PKGS_DIR}/aarch64-unknown-linux-gnu/ @@ -30,7 +36,7 @@ rm termscp cd - # Build aarch64_centos7 cd aarch64_centos7/ -docker buildx build --platform linux/arm64 --build-arg branch=${VERSION} --tag termscp-${VERSION}-aarch64_centos7 . +docker buildx build --platform linux/arm64 --no-cache --build-arg branch=${BRANCH} --tag termscp-${VERSION}-aarch64_centos7 . cd - mkdir -p ${PKGS_DIR}/rpm/ CONTAINER_NAME=$(docker create termscp-${VERSION}-aarch64_centos7 /bin/bash) diff --git a/dist/build/linux-x86_64.sh b/dist/build/linux-x86_64.sh index 7802f60..f81edc2 100755 --- a/dist/build/linux-x86_64.sh +++ b/dist/build/linux-x86_64.sh @@ -1,12 +1,18 @@ #!/bin/bash if [ -z "$1" ]; then - echo "Usage: $0 " + echo "Usage: $0 [branch]" exit 1 fi VERSION=$1 +if [ -z "$2" ]; then + BRANCH=$VERSION +else + BRANCH=$2 +fi + set -e # Don't fail # Create pkgs directory @@ -16,7 +22,7 @@ cd - mkdir -p ${PKGS_DIR}/ # Build x86_64_deb cd x86_64_debian9/ -docker build --build-arg branch=${VERSION} --tag termscp-${VERSION}-x86_64_debian9 . +docker build --no-cache --build-arg branch=${BRANCH} --tag termscp-${VERSION}-x86_64_debian9 . cd - mkdir -p ${PKGS_DIR}/deb/ mkdir -p ${PKGS_DIR}/x86_64-unknown-linux-gnu/ @@ -30,7 +36,7 @@ rm termscp cd - # Build x86_64_centos7 cd x86_64_centos7/ -docker build --build-arg branch=${VERSION} --tag termscp-${VERSION}-x86_64_centos7 . +docker build --no-cache --build-arg branch=${BRANCH} --tag termscp-${VERSION}-x86_64_centos7 . cd - mkdir -p ${PKGS_DIR}/rpm/ CONTAINER_NAME=$(docker create termscp-${VERSION}-x86_64_centos7 /bin/bash)