Skip to content

Commit

Permalink
release script
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Jan 17, 2018
1 parent 481e9af commit 074231d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ Note: It's recommended that you now delete `secrets.json` if you don't need it.
### Configuration

This tool reads all the `VAULT_*` environment variables as the vault cli does. You likely need to specify those for the address, CA certs, etc.

## Releases

There are various makefile commands for building parts of the release `make release` builds and pushes everything.

You can run `make docker` to build a tagged docker image.
21 changes: 19 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION := $$(grep -Eo '(\d\.\d\.\d)(-dev)?' main.go)
VERSION := $(shell grep -Eo '(\d\.\d\.\d)(-dev)?' main.go)

.PHONY: build check test
.PHONY: build check test mkrel upload

linux: linux_amd64
linux_amd64:
Expand Down Expand Up @@ -31,3 +31,20 @@ build: check

docker: dist
docker build -t adamdecaf/vault-backend-migrator:$(VERSION) .

dockerpush: docker
docker push -t adamdecaf/vault-backend-migrator:$(VERSION)

release: ci docker dockerpush mkrel upload

mkrel:
ifeq ($(DEV), )
$(shell gothub release -u adamdecaf -r vault-backend-migrator -t $(VERSION) --name $(VERSION) --pre-release)
else
$(shell gothub release -u adamdecaf -r vault-backend-migrator -t $(VERSION) --name $(VERSION))
endif

upload:
gothub upload -u adamdecaf -r vault-backend-migrator -t $(VERSION) --name "vault-backend-migrator-linux" --file bin/vault-backend-migrator-linux-amd64
gothub upload -u adamdecaf -r vault-backend-migrator -t $(VERSION) --name "vault-backend-migrator-osx" --file bin/vault-backend-migrator-osx-amd64
gothub upload -u adamdecaf -r vault-backend-migrator -t $(VERSION) --name "vault-backend-migrator.exe" --file bin/vault-backend-migrator-amd64.exe

0 comments on commit 074231d

Please sign in to comment.