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:
Megan Marsh 2019-05-10 11:10:24 -07:00 committed by GitHub
commit 69aec690fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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: