From abc7917eb4a3f58fe14f4adba13cbf5476b6eb42 Mon Sep 17 00:00:00 2001 From: rohitagg2020 <55523204+rohitagg2020@users.noreply.github.com> Date: Tue, 7 Feb 2023 13:19:53 +0530 Subject: [PATCH 1/2] Move release process to goreleaser (#698) * Move release process to goreleaser Signed-off-by: rohitagg2020 * Fixing the spaces Signed-off-by: rohitagg2020 * Removing unnecessary command Signed-off-by: rohitagg2020 * Using commit instead of tag Signed-off-by: rohitagg2020 --------- Signed-off-by: rohitagg2020 --- .goreleaser.yml | 9 +++++++-- hack/build-binaries.sh | 6 ++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index db57a7033..20cbbd5c3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,6 +2,8 @@ # Make sure to check the documentation at http://goreleaser.com before: hooks: + - go fmt ./cmd/... ./pkg/... ./test/... + - go mod vendor - go mod tidy builds: - env: @@ -13,6 +15,9 @@ builds: goarch: - amd64 - arm64 + ignore: + - goos: windows + goarch: arm64 main: ./cmd/kapp binary: kapp-{{ .Os }}-{{ .Arch }} @@ -40,8 +45,8 @@ snapshot: release: # Repo in which the release will be created. github: - owner: vmware-tanzu - name: carvel-kapp + owner: carvel-dev + name: kapp # If set to true, will not auto-publish the release. draft: true diff --git a/hack/build-binaries.sh b/hack/build-binaries.sh index 5623ceb62..39bd797aa 100755 --- a/hack/build-binaries.sh +++ b/hack/build-binaries.sh @@ -2,14 +2,16 @@ set -e -x -u -./hack/build.sh - function get_latest_git_tag { git describe --tags | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' } VERSION="${1:-`get_latest_git_tag`}" +go fmt ./cmd/... ./pkg/... ./test/... +go mod vendor +go mod tidy + # makes builds reproducible export CGO_ENABLED=0 LDFLAGS="-X github.com/vmware-tanzu/carvel-kapp/pkg/kapp/version.Version=$VERSION -buildid=" From f30497bab903155bb777675ffeb8bcc219bffdbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pereira?= Date: Thu, 4 May 2023 00:47:11 -0500 Subject: [PATCH 2/2] Remove go tidy from release step (#732) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove go tidy from release step Bump goreleaser to the latest version Signed-off-by: João Pereira * Specify the tag being used for a release Signed-off-by: João Pereira --------- Signed-off-by: João Pereira --- .goreleaser.yml | 5 ----- hack/build-binaries.sh | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 20cbbd5c3..e83e10aee 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,10 +1,5 @@ # This is an example .goreleaser.yml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com -before: - hooks: - - go fmt ./cmd/... ./pkg/... ./test/... - - go mod vendor - - go mod tidy builds: - env: - CGO_ENABLED=0 diff --git a/hack/build-binaries.sh b/hack/build-binaries.sh index 39bd797aa..a9a2a7996 100755 --- a/hack/build-binaries.sh +++ b/hack/build-binaries.sh @@ -6,11 +6,7 @@ function get_latest_git_tag { git describe --tags | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' } -VERSION="${1:-`get_latest_git_tag`}" - -go fmt ./cmd/... ./pkg/... ./test/... -go mod vendor -go mod tidy +VERSION="${1:-$(get_latest_git_tag)}" # makes builds reproducible export CGO_ENABLED=0