Skip to content

Commit

Permalink
Move release process to goreleaser (#698)
Browse files Browse the repository at this point in the history
* Move release process to goreleaser

Signed-off-by: rohitagg2020 <rohit.aggarwal2020@gmail.com>

* Fixing the spaces

Signed-off-by: rohitagg2020 <rohit.aggarwal2020@gmail.com>

* Removing unnecessary command

Signed-off-by: rohitagg2020 <rohit.aggarwal2020@gmail.com>

* Using commit instead of tag

Signed-off-by: rohitagg2020 <rohit.aggarwal2020@gmail.com>

---------

Signed-off-by: rohitagg2020 <rohit.aggarwal2020@gmail.com>
  • Loading branch information
rohitagg2020 authored and kumari tanushree committed Jun 19, 2023
1 parent 0e2e052 commit 3842ba6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
EOF
)
- name: Run Test cases
- name: Run Test cases
run: |
# Setup minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
Expand Down
9 changes: 7 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -13,6 +15,9 @@ builds:
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
main: ./cmd/kapp
binary: kapp-{{ .Os }}-{{ .Arch }}

Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions hack/build-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="
Expand Down

0 comments on commit 3842ba6

Please sign in to comment.