Add dev build option
This commit is contained in:
8
build
8
build
@@ -47,6 +47,12 @@ echo "Please notice, that this build script includes metadata into the build."
|
|||||||
echo "This information is useful for debugging and license compliance."
|
echo "This information is useful for debugging and license compliance."
|
||||||
echo "Run the compiled binary with the -version flag to see the information included."
|
echo "Run the compiled binary with the -version flag to see the information included."
|
||||||
|
|
||||||
|
if [[ $1 == "dev" ]]; then
|
||||||
|
shift
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
DEV="-race"
|
||||||
|
fi
|
||||||
|
|
||||||
# build
|
# build
|
||||||
BUILD_PATH="github.com/Safing/portbase/info"
|
BUILD_PATH="github.com/Safing/portbase/info"
|
||||||
go build -ldflags "-X ${BUILD_PATH}.commit=${BUILD_COMMIT} -X ${BUILD_PATH}.buildOptions=${BUILD_BUILDOPTIONS} -X ${BUILD_PATH}.buildUser=${BUILD_USER} -X ${BUILD_PATH}.buildHost=${BUILD_HOST} -X ${BUILD_PATH}.buildDate=${BUILD_DATE} -X ${BUILD_PATH}.buildSource=${BUILD_SOURCE}" $*
|
go build $DEV -ldflags "-X ${BUILD_PATH}.commit=${BUILD_COMMIT} -X ${BUILD_PATH}.buildOptions=${BUILD_BUILDOPTIONS} -X ${BUILD_PATH}.buildUser=${BUILD_USER} -X ${BUILD_PATH}.buildHost=${BUILD_HOST} -X ${BUILD_PATH}.buildDate=${BUILD_DATE} -X ${BUILD_PATH}.buildSource=${BUILD_SOURCE}" $*
|
||||||
|
|||||||
Reference in New Issue
Block a user