Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Issue #93: print SHA-256 sum of compiled binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
bpicode committed Oct 29, 2017
1 parent 664dacd commit c75d829
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ go_import_path: github.com/bpicode/fritzctl

script:
- export FRITZCTL_VERSION=0.0.1-unofficial-ci-travis
- make clean all
- make clean all dist_all

after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
25 changes: 12 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,23 @@ codequality:

dist_all: dist_linux dist_darwin dist_win

dist_darwin:
@echo -n ">> BUILD, darwin/amd64"
@(GOOS=darwin GOARCH=amd64 go build -o build/distributions/darwin_amd64/fritzctl $(LDFLAGS))
define dist
@echo -n ">> BUILD, $(1)/$(2) "
@(GOOS=$(1) GOARCH=$(2) go build -o $(3) $(LDFLAGS))
@cp $(3) build/distributions/fritzctl-$(1)-$(2)$(4)
@cd build/distributions && shasum -a 256 "fritzctl-$(1)-$(2)$(4)" | tee "fritzctl-$(1)-$(2)$(4).sha256" | cut -b 1-40 -z
@$(call ok)
endef

dist_darwin:
@$(call dist,darwin,amd64,build/distributions/darwin_amd64/fritzctl,"")

dist_win:
@echo -n ">> BUILD, windows/amd64"
@(GOOS=windows GOARCH=amd64 go build -o build/distributions/windows_amd64/fritzctl.exe $(LDFLAGS))
@$(call ok)
@$(call dist,windows,amd64,build/distributions/windows_amd64/fritzctl.exe,".exe")

dist_linux:
@echo -n ">> BUILD, linux/amd64"
@(GOOS=linux GOARCH=amd64 go build -o build/distributions/linux_amd64/usr/bin/fritzctl $(LDFLAGS))
@$(call ok)

@echo -n ">> BUILD, linux/arm"
@(GOOS=linux GOARCH=arm GOARM=6 go build -o build/distributions/linux_arm/usr/bin/fritzctl $(LDFLAGS))
@$(call ok)
@$(call dist,linux,amd64,build/distributions/linux_amd64/usr/bin/fritzctl,"")
@$(call dist,linux,arm,build/distributions/linux_arm/usr/bin/fritzctl,"")

pkg_all: pkg_linux pkg_darwin pkg_win

Expand Down

0 comments on commit c75d829

Please sign in to comment.