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
if [ -z "$1" ]; then
echo "Usage: $0 <version>"
echo "Usage: $0 <version> [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)

View File

@@ -1,12 +1,18 @@
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <version>"
echo "Usage: $0 <version> [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)