@@ -55,21 +55,21 @@ tasks:
5555 go vet
5656
5757 golint :
58- # in CI it is run
58+ # in CI it is run
5959 context : golint
6060 description : Runs the linter and go vet and other default static checks
6161 allow_failure : false
6262 command :
6363 # echo "lint ran with exit code: $?"
64- # pwd && ls -lat
65- - |
64+ # pwd && ls -lat
65+ - |
6666 golangci-lint run
6767
6868 vuln:check :
6969 context : go1x
70- description : |
70+ description : |
7171 Runs a vulnerability scan against the code base
72- command :
72+ command :
7373 - |
7474 go install golang.org/x/vuln/cmd/govulncheck@latest
7575 govulncheck ./...
7878 description : generate coverage
7979 context : go1x
8080 command :
81- - |
81+ - |
8282 go install github.com/jstemmer/go-junit-report/v2@latest
8383 go install github.com/axw/gocov/gocov@latest
8484 go install github.com/AlekSi/gocov-xml@latest
@@ -90,11 +90,11 @@ tasks:
9090 command : go tool cover -html=.coverage/out
9191
9292 show_docs :
93- description : |
93+ description : |
9494 Opens a webview with godoc running
9595 Already filters the packages to this one and enables
9696 internal/private package documentation
97- # go install golang.org/x/tools/cmd/godoc@latest
97+ # go install golang.org/x/tools/cmd/godoc@latest
9898 command : |
9999 open http://localhost:6060/pkg/github.com/DevLabFoundry/configmanager/v2/?m=all
100100 godoc -notes "BUG|TODO" -play -http=:6060
@@ -103,13 +103,12 @@ tasks:
103103 context : go1x
104104 description : |
105105 Generates binaries in a dist folder
106-
107106 Generates all the binaries for the configmanager utility.
108107 command :
109- - |
110- ldflags="-s -w -X \"github.com/DevLabFoundry/configmanager/v2/cmd/configmanager.Version={{. VERSION}} \" -X \"github.com/DevLabFoundry/configmanager/v2/cmd/configmanager.Revision={{. REVISION} }\" -extldflags -static"
108+ - |
109+ ldflags="-s -w -X \"github.com/DevLabFoundry/configmanager/v2/cmd/configmanager.Version=${ VERSION}\" -X \"github.com/DevLabFoundry/configmanager/v2/cmd/configmanager.Revision=${ REVISION}\" -extldflags -static"
111110 GOOS=${BUILD_GOOS} GOARCH=${BUILD_GOARCH} CGO_ENABLED=0 go build -mod=readonly -buildvcs=false -ldflags="$ldflags" \
112- -o ./dist/configmanager-${GOOS }-${GOARCH }${BUILD_SUFFIX} ./cmd
111+ -o ./dist/configmanager-${BUILD_GOOS }-${BUILD_GOARCH }${BUILD_SUFFIX} ./cmd
113112 reset_context : true
114113 variations :
115114 - BUILD_GOOS : darwin
@@ -134,7 +133,7 @@ tasks:
134133 BUILD_GOARCH : " 386"
135134 BUILD_SUFFIX : " .exe"
136135 required :
137- args :
136+ env :
138137 - VERSION
139138 - REVISION
140139
@@ -151,24 +150,23 @@ tasks:
151150 - REVISION
152151
153152pipelines :
154- test :
153+ test :
155154 - task : clean
156155 - task : run:test
157156 depends_on : clean
158157 - task : coverage
159158 depends_on : run:test
160159
161- lint :
160+ lint :
162161 - task : lint:vet
163162 - task : vuln:check
164-
163+
165164 show_coverage :
166165 - pipeline : test
167166 - task : show:coverage
168167 depends_on : test
169-
170- build:bin :
168+
169+ build:bin :
171170 - task : clean
172171 - task : build:binary
173172 depends_on : clean
174-
0 commit comments