Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated goreleaser #25

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: vergo
before:
hooks:
Expand Down Expand Up @@ -27,7 +28,7 @@ builds:
- -X "github.com/sky-uk/vergo/cmd.builtBy={{.Env.BUILT_BY}}"

snapshot:
name_template: "{{ .Env.GORELEASER_CURRENT_TAG }}"
version_template: "{{ .Env.GORELEASER_CURRENT_TAG }}"

archives:
- id: default
Expand Down
18 changes: 9 additions & 9 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.PHONY: fun-tests unit-tests test

export

GORELEASER_VERSION := 0.179.0
GORELEASER_VERSION := 2.3.0
nidhiaj marked this conversation as resolved.
Show resolved Hide resolved
LINTER_VERSION := 1.58.1
PATH := $(shell pwd)/bin:$(PATH)
SHELL := bash
ARCH := $(shell uname -m)
OS := $(shell uname -s)

.ONESHELL:
.SHELLFLAGS := -ec
Expand All @@ -31,7 +31,7 @@ bin/golangci-lint: bin
bin/goreleaser: bin
@test -f $@ ||
(
curl -fsL https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/goreleaser_`uname`_x86_64.tar.gz -o goreleaser.tgz
curl -fsL https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/goreleaser_${OS}_${ARCH}.tar.gz -o goreleaser.tgz
tar xvf goreleaser.tgz -C bin goreleaser
rm goreleaser.tgz
bin/goreleaser --version
Expand All @@ -53,7 +53,7 @@ release: release-test check-licenses test
BUILT_BY="`goreleaser --version | head -n1`, `go version`" \
GORELEASER_CURRENT_TAG=`bin/vergo get latest-release -p` \
GORELEASER_PREVIOUS_TAG=`bin/vergo get previous-release -p` \
goreleaser release --rm-dist
goreleaser release --clean
bin/vergo push

unit-tests: pre-check
Expand All @@ -72,10 +72,10 @@ test-compile:
build: pre-check
BUILT_BY="`goreleaser --version | head -n1`, `go version`" \
GORELEASER_CURRENT_TAG=0+`git rev-parse --short HEAD` \
goreleaser build --snapshot --rm-dist
@dist/vergo_`uname | tr A-Z a-z`_amd64/vergo version
@cp dist/vergo_`uname | tr A-Z a-z`_amd64/vergo bin/vergo
@cp dist/vergo_`uname | tr A-Z a-z`_amd64/vergo /usr/local/bin/vergo 2>/dev/null || true
goreleaser build --snapshot --clean
@dist/vergo_`uname | tr A-Z a-z`_${ARCH}/vergo version
@cp dist/vergo_`uname | tr A-Z a-z`_${ARCH}/vergo bin/vergo
@cp dist/vergo_`uname | tr A-Z a-z`_${ARCH}/vergo /usr/local/bin/vergo 2>/dev/null || true

dependency-updates:
@go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -m all
Expand Down