Skip to content

Commit

Permalink
fixed build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Feb 22, 2023
1 parent 7ad7a15 commit 97151d1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions dist/build/linux-aarch64.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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/
Expand All @@ -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)
Expand Down
12 changes: 9 additions & 3 deletions dist/build/linux-x86_64.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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/
Expand All @@ -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)
Expand Down

0 comments on commit 97151d1

Please sign in to comment.