Skip to content

Commit

Permalink
Set the binaries version to correct version (#328)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
miry committed Sep 23, 2021
1 parent a950990 commit a26226e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Expand Up @@ -35,7 +35,7 @@ builds:
goarch: arm64

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

- <<: *build_default
id: client
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
# [Unreleased]

# [2.1.7]

* Set the valid version during the build process.
Verify the correct verion of the built binaries with `make release-dry` (#328, @miry)

# [2.1.6]

* Use CHANGELOG.md for release description (#306, @miry)
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -35,7 +35,10 @@ release:

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

.PHONY: setup
setup:
Expand Down

0 comments on commit a26226e

Please sign in to comment.