Skip to content

Commit 9052b19

Browse files
author
Matthew Fisher
committed
use pattern rules for checksums
this commit uses pattern rules for matching file names, allowing for a single target to generate multiple targets. Signed-off-by: Matthew Fisher <[email protected]>
1 parent d9d3b40 commit 9052b19

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

Makefile

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,15 @@ clean:
7272
fmt:
7373
gofmt -w $(GOFMT_FILES)
7474

75-
checksum-windows-386:
76-
cd dist && sha256sum $(NAME)-windows-386.zip
75+
dist/$(NAME)-checksum-%:
76+
cd dist && sha256sum $@.zip
7777

78-
checksum-windows-amd64:
79-
cd dist && sha256sum $(NAME)-windows-amd64.zip
80-
81-
checksum-darwin:
82-
cd dist && sha256sum $(NAME)-darwin-amd64.zip
83-
84-
checksum-linux:
85-
cd dist && sha256sum $(NAME)-linux-amd64.zip
86-
87-
checksums: checksum-darwin checksum-windows-386 checksum-windows-amd64 checksum-linux
78+
checksums: dist/$(NAME)-checksum-darwin-amd64 dist/$(NAME)-checksum-windows-386 dist/$(NAME)-checksum-windows-amd64 dist/$(NAME)-checksum-linux-amd64
8879

8980
chocolatey/$(NAME)/$(NAME).$(TAG).nupkg: chocolatey/$(NAME)/$(NAME).nuspec
9081
cd chocolatey/$(NAME) && choco pack
9182

9283
choco:
9384
cd chocolatey/$(NAME) && choco push $(NAME).$(TAG).nupkg -s https://chocolatey.org/
9485

95-
.PHONY: release snapshot fmt clean cover acceptance lint docker test vet watch build check checksum-windows-386 checksum-windows-amd64 checksum-darwin checksum-linux choco checksum
86+
.PHONY: release snapshot fmt clean cover acceptance lint docker test vet watch build check choco checksums

0 commit comments

Comments
 (0)