You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
566 B

#! /bin/bash
# ./build.sh exchange 1.0 domain
APP=$1
VERSION=$2
DOMAIN=$3
GO111MODULE=on
CGO_ENABLED=0
GOOS=linux
GOARCH=amd64
go build -o target/$APP cmd/$APP/main.go
if [ -n "$VERSION" ]; then
if [ -n "$DOMAIN" ]; then
echo "docker build -t $DOMAIN/sig-$APP:$VERSION --build-arg APP=$APP ."
docker build -t $DOMAIN/sig-$APP:$VERSION --build-arg APP=$APP .
else
echo "docker build -t sig-$APP:$VERSION --build-arg APP=$APP ."
docker build -t sig-$APP:$VERSION --build-arg APP=$APP .
fi
fi
echo "$APP build finished"