Skip build vcs lookups, go 1.20 thing

This commit is contained in:
Jamie Curnow 2023-02-24 21:21:14 +10:00
parent 0eeed1695c
commit bc3d9ec099
No known key found for this signature in database
GPG Key ID: FFBB624C43388E9E
3 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,7 @@ tasks:
silent: true
- cmd: rm -f dist/bin/*
silent: true
- cmd: go build -ldflags="-X main.commit={{.GIT_COMMIT}} -X main.version={{.VERSION}}" -o ../dist/bin/server ./cmd/server/main.go
- cmd: go build -buildvcs=false -ldflags="-X main.commit={{.GIT_COMMIT}} -X main.version={{.VERSION}}" -o ../dist/bin/server ./cmd/server/main.go
silent: true
- task: lint
vars:

View File

@ -54,6 +54,7 @@ build_backend() {
-w '/app/backend' \
"${IMAGE}" \
go build \
-buildvcs=false \
-ldflags "-w -s -X main.commit=${BUILD_COMMIT:-notset} -X main.version=${BUILD_VERSION} -X main.sentryDSN=${SENTRY_DSN:-}" \
-o "/app/bin/$FILENAME" \
./cmd/server

View File

@ -23,6 +23,7 @@ esac
echo -e "${BLUE} ${CYAN}Building binary for ${YELLOW}${GOARCH} (${TARGETPLATFORM:-})${RESET}"
go build \
-buildvcs=false \
-ldflags "-w -s -X main.commit=${BUILD_COMMIT:-notset} -X main.version=${BUILD_VERSION} -X main.sentryDSN=${SENTRY_DSN:-}" \
-o "${1:-/dist/server}" \
./cmd/server