Merge pull request #7630 from hashicorp/ldflags
circle-ci: add `-ldflags="-s -w"` for smaller go binaries & tag nightly build as a 'pre-release'
This commit is contained in:
commit
69aec690fe
|
@ -4,7 +4,7 @@ defaults: &golang
|
|||
working_directory: /go/src/github.com/hashicorp/packer
|
||||
steps:
|
||||
- checkout
|
||||
- run: go build -o ./pkg/packer_$(go env GOOS)_$(go env GOARCH) .
|
||||
- run: go build -ldflags="-s -w" -o ./pkg/packer_$(go env GOOS)_$(go env GOARCH) .
|
||||
- run: zip ./pkg/packer_$(go env GOOS)_$(go env GOARCH).zip ./pkg/packer_$(go env GOOS)_$(go env GOARCH)
|
||||
- run: rm ./pkg/packer_$(go env GOOS)_$(go env GOARCH)
|
||||
- persist_to_workspace:
|
||||
|
@ -67,7 +67,7 @@ jobs:
|
|||
- attach_workspace:
|
||||
at: .
|
||||
- run: |
|
||||
ghr -t ${GITHUB_TOKEN_AZR} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./pkg/
|
||||
ghr -prerelease -t ${GITHUB_TOKEN_AZR} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./pkg/
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_check_vendor_vs_module:
|
||||
|
|
Loading…
Reference in New Issue