File tree Expand file tree Collapse file tree 5 files changed +17
-3
lines changed
Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ builds:
1212 - amd64
1313 - arm
1414 - arm64
15- - " 386"
15+ - ' 386'
1616 goos :
1717 - darwin
1818 - linux
@@ -22,17 +22,18 @@ builds:
2222 - openbsd
2323 ignore :
2424 - goos : darwin
25- goarch : " 386"
25+ goarch : ' 386'
2626 - goos : openbsd
2727 goarch : arm
2828 flags :
2929 - -trimpath
3030 ldflags :
3131 - -s
3232 - -w
33+ - -X github.com/justjanne/powerline-go/powerline.Version={{ .Version }}
3334
3435archives :
35- - name_template : " {{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
36+ - name_template : ' {{ .ProjectName }}-{{ .Os }}-{{ .Arch }}'
3637 format : binary
3738
3839checksum :
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ type arguments struct {
4747 IgnoreWarnings * bool
4848 Time * string
4949 ViMode * string
50+ Version * bool
5051}
5152
5253var args = arguments {
@@ -231,4 +232,8 @@ var args = arguments{
231232 "vi-mode" ,
232233 defaults .ViMode ,
233234 comments ("The current vi-mode (eg. KEYMAP for zsh) for vi-module module" )),
235+ Version : flag .Bool (
236+ "version" ,
237+ false ,
238+ comments ("Print the current version and exit" )),
234239}
Original file line number Diff line number Diff line change @@ -125,6 +125,11 @@ func commentsWithDefaults(lines ...string) string {
125125func main () {
126126 flag .Parse ()
127127
128+ if * args .Version {
129+ fmt .Println (pwl .Version )
130+ return
131+ }
132+
128133 cfg := defaults
129134 err := cfg .Load ()
130135 if err != nil {
Original file line number Diff line number Diff line change 1+ package powerline
2+
3+ var Version = "development"
You can’t perform that action at this time.
0 commit comments