Skip to content

Commit a26226e

Browse files
authored
Set the binaries version to correct version (#328)
There is a missing spot during upgrade the modules to `/v2` - goreleaser config. The latest build 2.1.6 returns `git` as version: ```shell $ toxiproxy-cli --version toxiproxy-cli version git ``` Add validation with `make release-dry` to check that the tags are correctly set.
1 parent a950990 commit a26226e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ builds:
3535
goarch: arm64
3636

3737
ldflags:
38-
- -s -w -X github.com/Shopify/toxiproxy.Version={{.Version}}
38+
- -s -w -X github.com/Shopify/toxiproxy/v2.Version={{.Version}}
3939

4040
- <<: *build_default
4141
id: client

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# [Unreleased]
22

3+
# [2.1.7]
4+
5+
* Set the valid version during the build process.
6+
Verify the correct verion of the built binaries with `make release-dry` (#328, @miry)
7+
38
# [2.1.6]
49

510
* Use CHANGELOG.md for release description (#306, @miry)

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ release:
3535

3636
.PHONY: release-dry
3737
release-dry:
38-
goreleaser release --rm-dist --skip-publish --skip-validate --snapshot
38+
version="$(shell git describe --abbrev=0 --tags)"
39+
goreleaser build --rm-dist --single-target --skip-validate
40+
./dist/toxiproxy-cli-* --version | grep "toxiproxy-cli version $(version)"
41+
goreleaser release --rm-dist --skip-publish --skip-validate
3942

4043
.PHONY: setup
4144
setup:

0 commit comments

Comments
 (0)