File tree Expand file tree Collapse file tree 7 files changed +26
-9
lines changed
Expand file tree Collapse file tree 7 files changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -52,16 +52,15 @@ linters:
5252 - gocyclo
5353 - gofmt
5454 - goimports
55- - golint
55+ - revive
5656 - gosec
5757 - gosimple
5858 - govet
5959 - ineffassign
60- - interfacer
6160 - lll
6261 - misspell
6362 - nakedret
64- - scopelint
63+ - exportloopref
6564 - staticcheck
6665 - structcheck
6766 - stylecheck
Original file line number Diff line number Diff line change 88 - go generate ./...
99builds :
1010 - main : ./cmd/cli/main.go
11+ ldflags : -s -w -X main.version="{{.Version}}"
1112 env :
1213 - CGO_ENABLED=0
1314 goos :
@@ -26,7 +27,7 @@ archives:
2627checksum :
2728 name_template : ' checksums.txt'
2829snapshot :
29- name_template : " {{ incpatch .Version }}-next "
30+ name_template : " {{ .Version }}"
3031changelog :
3132 sort : asc
3233 filters :
Original file line number Diff line number Diff line change 1+ .PHONY : release
12
23lint :
34 golangci-lint run -v
@@ -13,3 +14,6 @@ ci-lint:
1314
1415ci-test :
1516 docker-compose -f ./docker-compose.ci.yaml run ergo-ci make test
17+
18+ release :
19+ goreleaser build --rm-dist --snapshot
Original file line number Diff line number Diff line change 44 "github.com/beatlabs/ergo/commands"
55)
66
7+ var version = "develop"
8+
79func main () {
8- commands .Execute ()
10+ commands .Execute (version )
911}
Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ var (
1515)
1616
1717// Execute entry point for commands.
18- func Execute () {
18+ func Execute (version string ) {
1919 rootCommand := setUpCommand ()
2020 defineRootCommandProperties (rootCommand )
2121 rootCommand .AddCommand (defineStatusCommand ())
2222 rootCommand .AddCommand (defineTagCommand ())
23- rootCommand .AddCommand (defineVersionCommand ())
23+ rootCommand .AddCommand (defineVersionCommand (version ))
2424 rootCommand .AddCommand (defineDraftCommand ())
2525 rootCommand .AddCommand (defineDeployCommand ())
2626 if err := rootCommand .Execute (); err != nil {
Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ import (
66)
77
88// defineVersionCommand defines the version command.
9- func defineVersionCommand () * cobra.Command {
9+ func defineVersionCommand (version string ) * cobra.Command {
1010 return & cobra.Command {
1111 Use : "version" ,
1212 Short : "the version of ergo" ,
1313 Long : "the version of ergo" ,
1414 Run : func (cmd * cobra.Command , args []string ) {
15- cli .NewCLI ().PrintColorizedLine ("Version: " , "0.4.1" , cli .WarningType )
15+ cli .NewCLI ().PrintColorizedLine ("Version: " , version , cli .WarningType )
1616 },
1717 }
1818}
Original file line number Diff line number Diff line change @@ -84,3 +84,14 @@ You have to use this in order to:
8484- Information about the draft release body and what will change at the time of the release.
8585
8686[ Sample config file] ( .ergo.yml.dist )
87+
88+ ## Release Ergo
89+
90+ In order to release a new version of Ergo, execute the following steps:
91+ 1 . Create a new [ release] ( https://github.com/beatlabs/ergo/releases ) and publish it
92+ 2 . Execute
93+ ``` bash
94+ make release
95+ ````
96+ 3. Edit the created release and add the content of the ` dist` folder
97+ 4. Point the README download URL to the latest version
You can’t perform that action at this time.
0 commit comments