Skip to content

Commit

Permalink
update version, makefile to include sha256check
Browse files Browse the repository at this point in the history
  • Loading branch information
bcicen committed Mar 9, 2021
1 parent cc11cf0 commit 1a31690
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
28 changes: 15 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
NAME=slackcat
VERSION=$(shell cat VERSION)
BUILD=$(shell git rev-parse --short HEAD)
LDFLAGS="-s -X main.version=$(VERSION) -X main.build=$(BUILD)"

clean:
rm -rf build/ release/ arch-release/
rm -rf _build/ _release/ _arch-release/

deps:
go mod download

build: deps
go build -tags osusergo,netgo -ldflags "-s -X main.version=$(VERSION) -X main.build=$(BUILD)" -o slackcat
go build -tags osusergo,netgo -ldflags $(LDFLAGS) -o slackcat

build-all: deps
mkdir -p build
GOOS=darwin GOARCH=amd64 go build -tags osusergo,netgo -ldflags "-s -X main.version=$(VERSION) -X main.build=$(BUILD)" -o build/slackcat-$(VERSION)-darwin-amd64
GOOS=linux GOARCH=amd64 go build -tags osusergo,netgo -ldflags "-s -X main.version=$(VERSION) -X main.build=$(BUILD)" -o build/slackcat-$(VERSION)-linux-amd64
GOOS=linux GOARCH=arm go build -tags osusergo,netgo -ldflags "-s -X main.version=$(VERSION) -X main.build=$(BUILD)" -o build/slackcat-$(VERSION)-linux-arm
GOOS=freebsd GOARCH=amd64 go build -tags osusergo,netgo -ldflags "-s -X main.version=$(VERSION) -X main.build=$(BUILD)" -o build/slackcat-$(VERSION)-freebsd-amd64
mkdir -p _build
GOOS=darwin GOARCH=amd64 go build -tags osusergo,netgo -ldflags $(LDFLAGS) -o _build/slackcat-$(VERSION)-darwin-amd64
GOOS=linux GOARCH=amd64 go build -tags osusergo,netgo -ldflags $(LDFLAGS) -o _build/slackcat-$(VERSION)-linux-amd64
GOOS=linux GOARCH=arm go build -tags osusergo,netgo -ldflags $(LDFLAGS) -o _build/slackcat-$(VERSION)-linux-arm
GOOS=freebsd GOARCH=amd64 go build -tags osusergo,netgo -ldflags $(LDFLAGS) -o _build/slackcat-$(VERSION)-freebsd-amd64
cd _build; sha256sum * > sha256sums.txt

release:
mkdir release
cp build/* release
cd release; sha256sum --quiet --check sha256sums.txt && \
mkdir _release
cp _build/* _release/
cd _release; sha256sum --quiet --check sha256sums.txt && \
gh release create $(VERSION) -d -t v$(VERSION) *

arch-release:
mkdir -p arch-release
mkdir -p _arch-release
go get github.com/seletskiy/go-makepkg/...
cd arch-release && \
cd _arch-release && \
go-makepkg -p version "Commandline utility for posting snippets to Slack" git://github.com/bcicen/slackcat.git; \
git clone ssh://[email protected]/slackcat.git; \
cp build/* slackcat/
cd arch-release/slackcat/ && \
cd _arch-release/slackcat/ && \
mksrcinfo
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Slackcat is a simple commandline utility to post snippets to Slack.
Download the latest release for your platform:

```bash
curl -Lo slackcat https://github.com/bcicen/slackcat/releases/download/v1.7/slackcat-1.7-$(uname -s)-amd64
curl -Lo slackcat https://github.com/bcicen/slackcat/releases/download/v1.7.1/slackcat-1.7.1-$(uname -s)-amd64
sudo mv slackcat /usr/local/bin/
sudo chmod +x /usr/local/bin/slackcat
```
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7
1.7.1

0 comments on commit 1a31690

Please sign in to comment.