Skip to content

Commit

Permalink
Add SHA256SUMS file to releases
Browse files Browse the repository at this point in the history
  • Loading branch information
mtibben committed Jan 22, 2020
1 parent a23e9fd commit 3f6d7d6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/aws-vault
/aws-vault-*
/SHA256SUMS
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
export GO111MODULE=on
VERSION=$(shell git describe --tags --candidates=1 --dirty)
BUILD_FLAGS=-ldflags="-X main.Version=$(VERSION) -s -w" -trimpath
CERT_ID ?= Developer ID Application: 99designs Inc (NRM9HVJ62Z)
SRC=$(shell find . -name '*.go')

.PHONY: all clean release install
.PHONY: binaries clean release install

all: aws-vault-linux-amd64 aws-vault-linux-arm64 aws-vault-darwin-amd64 aws-vault-windows-386.exe aws-vault-freebsd-amd64
binaries: aws-vault-linux-amd64 aws-vault-linux-arm64 aws-vault-darwin-amd64 aws-vault-windows-386.exe aws-vault-freebsd-amd64

clean:
rm -f aws-vault aws-vault-linux-amd64 aws-vault-linux-arm64 aws-vault-darwin-amd64 aws-vault-darwin-amd64.dmg aws-vault-windows-386.exe aws-vault-freebsd-amd64
rm -f aws-vault aws-vault-linux-amd64 aws-vault-linux-arm64 aws-vault-darwin-amd64 aws-vault-darwin-amd64.dmg aws-vault-windows-386.exe aws-vault-freebsd-amd64 SHA256SUMS

release: all aws-vault-darwin-amd64.dmg
release: binaries aws-vault-darwin-amd64.dmg SHA256SUMS
@echo "\nTo update homebrew-cask run\n\n cask-repair -v $(shell echo $(VERSION) | sed 's/v\(.*\)/\1/') aws-vault\n"

aws-vault-darwin-amd64: $(SRC)
GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $@ .

aws-vault-freebsd-amd64: $(SRC)
GOOS=freebsd GOARCH=amd64 go build $(BUILD_FLAGS) -o $@ .

aws-vault-linux-amd64: $(SRC)
GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $@ .

aws-vault-linux-arm64: $(SRC)
GOOS=linux GOARCH=arm64 go build $(BUILD_FLAGS) -o $@ .

aws-vault-darwin-amd64: $(SRC)
GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $@ .

aws-vault-windows-386.exe: $(SRC)
GOOS=windows GOARCH=386 go build $(BUILD_FLAGS) -o $@ .

aws-vault-freebsd-amd64: $(SRC)
GOOS=freebsd GOARCH=amd64 go build $(BUILD_FLAGS) -o $@ .

aws-vault-darwin-amd64.dmg: aws-vault-darwin-amd64
./bin/create-dmg aws-vault-darwin-amd64 $@

SHA256SUMS: binaries aws-vault-darwin-amd64.dmg
shasum -a 256 aws-vault-freebsd-amd64 aws-vault-linux-amd64 aws-vault-linux-arm64 aws-vault-windows-386.exe aws-vault-darwin-amd64.dmg > $@

install:
rm -f aws-vault
go build $(BUILD_FLAGS) .
Expand Down

0 comments on commit 3f6d7d6

Please sign in to comment.