Run go fmt after build, so deps are there
@@ -27,10 +27,6 @@ jobs:
keys:
- linux-go-{{ checksum "go.sum" }}-<< pipeline.parameters.cache-key >>
- - run:
- name: Enforce Go Formatted Code
- command: "[ `go fmt ./... 2>&1 | wc -l` -eq 0 ]"
-
- run:
name: Install goreleaser
command: go install github.com/goreleaser/goreleaser@latest
@@ -50,6 +46,10 @@ jobs:
name: Build binaries
command: goreleaser build --snapshot
+ - run:
+ name: Enforce Go Formatted Code
+ command: "[ `go fmt ./... | wc -l` -eq 0 ]"
+
- save_cache: # restores saved cache if no changes are detected since last run
key: linux-go-{{ checksum "go.sum" }}-<< pipeline.parameters.cache-key >>
paths:
