Skip to content

Commit

Permalink
Release tooling (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
pop authored Mar 30, 2018
1 parent cf0f93a commit 433458c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ fabric.properties

# End of https://www.gitignore.io/api/go,vagrant,intellij,intellij+all

### Release ###
ssh_exporter-*
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
GOBUILD=go build -x -v

default:
go build ssh_exporter.go

linux:
GOOS=linux GOARCH=amd64 $(GOBUILD) -o 'ssh_exporter-linux-amd64' ssh_exporter.go

darwin:
GOOS=darwin GOARCH=amd64 $(GOBUILD) -o 'ssh_exporter-darwin-amd64' ssh_exporter.go

windows:
GOOS=windows GOARCH=amd64 $(GOBUILD) -o 'ssh_exporter-windows-amd64' ssh_exporter.go

sha256sum:
shasum -a 256 ssh_exporter-* > 'ssh_exporter-sha256.txt'

release: linux darwin windows sha256sum

.NOTPARALLEL:

.PHONY: default linux darwin windows sha256sum release
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,15 @@ Some improvements that come to mind:
- Addition of `script_files` to (more easily) run multi-command scripts.
- Tests! Figure out a better integration test method.
## Cutting a release
If you find yourself cutting a release don't panic, it's easy!
0. Push a `git tag vX.Y.Z` to the repository.
1. On your local computer get the repo setup. This will involve installing the dependencies listed at the top of the README.
2. Run `make release`. This will create binaries for linux, darwin, and windows as well as a file with some sha256sums.
3. Upload said binaries to a release targeting the `vX.Y.Z` tag.
## Author
Nordstrom, Inc.
Expand Down

0 comments on commit 433458c

Please sign in to comment.