mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Add dev build option
This commit is contained in:
parent
be517dd58f
commit
c2c19abd48
1 changed files with 7 additions and 1 deletions
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 "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_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}" $*
|
||||
|
|
Loading…
Add table
Reference in a new issue