Skip to content

Commit f28ed63

Browse files
committed
Complete automate release versioning
1 parent 0c09ffc commit f28ed63

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ We'd love to accept your patches and contributions to this project. There are ju
55
1. Code should be `go fmt` formatted.
66
2. Exported types, constants, variables and functions should be documented.
77
3. Changes must be covered with tests.
8-
4. All tests must pass constantly `go test .`.
8+
4. All tests must pass constantly by running the `make` command.
99

1010
## Versioning
1111

@@ -15,8 +15,6 @@ Compromised service follows semantic versioning. New functionality should be acc
1515

1616
Any code which is complete, tested, reviewed, and merged to master can be released.
1717

18-
1. Update the `version` number in `version.go`.
19-
2. Make a pull request with these changes.
20-
3. Once the pull request has been merged, visit [https://github.com/janos/compromised/releases](https://github.com/janos/compromised/release) and click `Draft a new release`.
21-
4. Update the `Tag version` and `Release title` field with the new Compromised CLI version. Be sure the version has a `v` prefixed in both places, e.g. `v1.25.0`.
22-
5. Publish the release.
18+
Releasing a new version is automated with goreleaser and GitHub Actions.
19+
20+
To release, only a tag with semantic version and a prefix `v` should be pushed to the repository on GitHub, e.g. `v1.25.0`.

version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
package compromised
77

88
var (
9-
version = "0.1.0" // manually set semantic version number
9+
version = "0.0.0" // automatically set on release
1010
commit string // automatically set git commit hash
1111

1212
Version = func() string {
1313
if commit != "" {
1414
return version + "-" + commit
1515
}
16-
return version + "-dev"
16+
return version
1717
}()
1818
)

0 commit comments

Comments
 (0)