fixed build scripts

This commit is contained in:
veeso
2023-02-22 16:06:11 +01:00
parent 7ad7a1580d
commit 97151d18bf
2 changed files with 18 additions and 6 deletions

View File

@@ -1,12 +1,18 @@
#!/bin/bash #!/bin/bash
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Usage: $0 <version>" echo "Usage: $0 <version> [branch]"
exit 1 exit 1
fi fi
VERSION=$1 VERSION=$1
if [ -z "$2" ]; then
BRANCH=$VERSION
else
BRANCH=$2
fi
set -e # Don't fail set -e # Don't fail
# Create pkgs directory # Create pkgs directory
@@ -16,7 +22,7 @@ cd -
mkdir -p ${PKGS_DIR}/ mkdir -p ${PKGS_DIR}/
# Build aarch64_deb # Build aarch64_deb
cd aarch64_debian9/ 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 - cd -
mkdir -p ${PKGS_DIR}/deb/ mkdir -p ${PKGS_DIR}/deb/
mkdir -p ${PKGS_DIR}/aarch64-unknown-linux-gnu/ mkdir -p ${PKGS_DIR}/aarch64-unknown-linux-gnu/
@@ -30,7 +36,7 @@ rm termscp
cd - cd -
# Build aarch64_centos7 # Build aarch64_centos7
cd 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 - cd -
mkdir -p ${PKGS_DIR}/rpm/ mkdir -p ${PKGS_DIR}/rpm/
CONTAINER_NAME=$(docker create termscp-${VERSION}-aarch64_centos7 /bin/bash) CONTAINER_NAME=$(docker create termscp-${VERSION}-aarch64_centos7 /bin/bash)

View File

@@ -1,12 +1,18 @@
#!/bin/bash #!/bin/bash
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Usage: $0 <version>" echo "Usage: $0 <version> [branch]"
exit 1 exit 1
fi fi
VERSION=$1 VERSION=$1
if [ -z "$2" ]; then
BRANCH=$VERSION
else
BRANCH=$2
fi
set -e # Don't fail set -e # Don't fail
# Create pkgs directory # Create pkgs directory
@@ -16,7 +22,7 @@ cd -
mkdir -p ${PKGS_DIR}/ mkdir -p ${PKGS_DIR}/
# Build x86_64_deb # Build x86_64_deb
cd x86_64_debian9/ 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 - cd -
mkdir -p ${PKGS_DIR}/deb/ mkdir -p ${PKGS_DIR}/deb/
mkdir -p ${PKGS_DIR}/x86_64-unknown-linux-gnu/ mkdir -p ${PKGS_DIR}/x86_64-unknown-linux-gnu/
@@ -30,7 +36,7 @@ rm termscp
cd - cd -
# Build x86_64_centos7 # Build x86_64_centos7
cd 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 - cd -
mkdir -p ${PKGS_DIR}/rpm/ mkdir -p ${PKGS_DIR}/rpm/
CONTAINER_NAME=$(docker create termscp-${VERSION}-x86_64_centos7 /bin/bash) CONTAINER_NAME=$(docker create termscp-${VERSION}-x86_64_centos7 /bin/bash)