Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix checksum target
  • Loading branch information
mmlb committed Nov 7, 2017
1 parent b37ae9e commit 26935b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
bin/docker-machine-driver-*
checksums
20 changes: 13 additions & 7 deletions Makefile
Expand Up @@ -38,14 +38,20 @@ clean:
compile:
GOGC=off CGOENABLED=0 go build -ldflags "-s" -o bin/$(current_dir)$(BIN_SUFFIX)/$(current_dir) bin/main.go

pack:
pack: cross
find ./bin -mindepth 1 -type d -exec zip -r -j {}.zip {} \;

checksums:
@for file in $(wildcard bin/*.zip); do \
echo "sha256 $$(basename $$file) $$(openssl dgst -sha256 < $$file)"; \
echo "md5 $$(basename $$file) $$(openssl dgst -md5 < $$file)"; \
done
checksums: pack
for file in $(shell find bin -type f -name '*.zip'); do \
( \
cd $$(dirname $$file); \
f=$$(basename $$file); \
b2sum --tag $$f && \
sha256sum --tag $$f && \
sha512sum --tag $$f ; \
) \
done | sort >$@.tmp
@mv $@.tmp $@

print-success:
@echo
Expand Down Expand Up @@ -74,7 +80,7 @@ cleanrelease:
git tag -d $(version)
git push origin :refs/tags/$(version)

release: cross pack checksums
release: pack checksums
git tag -m $(version) $(version)
git push --tags
github-release release \
Expand Down

0 comments on commit 26935b2

Please sign in to comment.