Skip to content

Commit

Permalink
release: Containerized release process
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed May 15, 2019
1 parent 17696a7 commit c8f41db
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ ifndef HAS_GLIDE
endif
glide install --strip-vendor

.PHONY: docker-run-release
docker-run-release: export pkg=/go/src/github.com/databus23/helm-diff
docker-run-release:
git checkout master
git push
docker run -it --rm -e GITHUB_TOKEN -v $(shell pwd):$(pkg) -w $(pkg) golang:1.12.5 make bootstrap release

.PHONY: dist
dist: export COPYFILE_DISABLE=1 #teach OSX tar to not put ._* files in tar archive
dist:
Expand All @@ -57,5 +64,4 @@ release: dist
ifndef GITHUB_TOKEN
$(error GITHUB_TOKEN is undefined)
endif
git push
github-release databus23/helm-diff v$(VERSION) master "v$(VERSION)" "release/*"
scripts/release.sh v$(VERSION) master
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,11 @@ To run all tests:
```
go test -v ./...
```

## Release

Set `GITHUB_TOKEN` and run:

```
$ make docker-run-release
```
14 changes: 14 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

go get github.com/aktau/github-release

user=databus23
repo=helm-diff
tag=$1
commit=$2

github-release release -u $user -r $repo -t $tag -c $commit -n $tag

for f in $(ls release); do
github-release upload -u $user -r $repo -t $tag -n $f -f release/$f
done

0 comments on commit c8f41db

Please sign in to comment.