Fixed build.sh

This patch fixes passing the branch to the build script
This commit is contained in:
Hemna 2022-11-25 10:05:16 -05:00
parent d9b39734e6
commit d1a0a988f2
1 changed files with 10 additions and 4 deletions

View File

@ -11,8 +11,10 @@ cat << EOF
usage: $0 options
OPTIONS:
-h Show help
-t The tag/version (${TAG}) (default = master)
-d Use Dockerfile-dev for a git clone build
-b Branch to use (default = master)
EOF
}
@ -20,9 +22,9 @@ EOF
ALL_PLATFORMS=0
DEV=0
TAG="latest"
BRANCH="master"
BRANCH=${BRANCH:-master}
while getopts “t:dab:” OPTION
while getoptshdat:b:” OPTION
do
case $OPTION in
t)
@ -37,9 +39,13 @@ do
d)
DEV=1
;;
h)
usage
exit 0
;;
?)
usage
exit
exit -1
;;
esac
done
@ -51,7 +57,7 @@ then
PLATFORMS="linux/arm/v7,linux/arm64,linux/amd64"
#PLATFORMS="linux/arm/v7,linux/arm/v6,linux/amd64"
else
PLATFORMS="linux/amd64"
PLATFORMS="linux/amd64,linux/arm/v7"
fi
echo "Build with tag=${TAG} BRANCH=${BRANCH} dev?=${DEV} platforms?=${PLATFORMS}"