Fix build.sh usage function (#1368)
## Description Usage function not defined before use params are not properly specified ## Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🌻 Feature - [x] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Test - [ ] 💻 CI/Deployment - [x] 🐹 Trivial/Minor ## Issue(s) ## Test Plan <!-- How will this be tested prior to merging.--> - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
e4eaf44dcd
commit
cd8323fe06
@ -2,6 +2,15 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $(basename $0) binary | image [--platforms ...] [--tag ...]"
|
||||||
|
echo ""
|
||||||
|
echo "OPTIONS"
|
||||||
|
echo " -p | --platforms Platforms to build for (default: $PLATFORMS)"
|
||||||
|
echo " Specify multiple platforms using ',' (eg: linux/amd64,darwin/arm)"
|
||||||
|
echo " -t | --tag Tag for container image (default: $TAG)"
|
||||||
|
}
|
||||||
|
|
||||||
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
||||||
GOVER=1.18 # go version
|
GOVER=1.18 # go version
|
||||||
CORSO_BUILD_CACHE="/tmp/.corsobuild" # shared persistent cache
|
CORSO_BUILD_CACHE="/tmp/.corsobuild" # shared persistent cache
|
||||||
@ -44,15 +53,6 @@ while [ "$#" -gt 0 ]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo "Usage: $(basename $0) binary | image [--platforms ...] [--tag ...]"
|
|
||||||
echo ""
|
|
||||||
echo "OPTIONS"
|
|
||||||
echo " -p | --platforms Platforms to build for (default: $PLATFORMS)"
|
|
||||||
echo " Specify multiple platforms using ',' (eg: linux/amd64,darwin/arm)"
|
|
||||||
echo " -t | --tag Tag for container image (default: $TAG)"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$MODE" == "binary" ]; then
|
if [ "$MODE" == "binary" ]; then
|
||||||
mkdir -p ${CORSO_BUILD_CACHE} # prep env
|
mkdir -p ${CORSO_BUILD_CACHE} # prep env
|
||||||
for platform in ${PLATFORMS/,/ }; do
|
for platform in ${PLATFORMS/,/ }; do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user