Skip to content

Commit c8f41db

Browse files
committed
release: Containerized release process
1 parent 17696a7 commit c8f41db

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ ifndef HAS_GLIDE
3636
endif
3737
glide install --strip-vendor
3838

39+
.PHONY: docker-run-release
40+
docker-run-release: export pkg=/go/src/github.com/databus23/helm-diff
41+
docker-run-release:
42+
git checkout master
43+
git push
44+
docker run -it --rm -e GITHUB_TOKEN -v $(shell pwd):$(pkg) -w $(pkg) golang:1.12.5 make bootstrap release
45+
3946
.PHONY: dist
4047
dist: export COPYFILE_DISABLE=1 #teach OSX tar to not put ._* files in tar archive
4148
dist:
@@ -57,5 +64,4 @@ release: dist
5764
ifndef GITHUB_TOKEN
5865
$(error GITHUB_TOKEN is undefined)
5966
endif
60-
git push
61-
github-release databus23/helm-diff v$(VERSION) master "v$(VERSION)" "release/*"
67+
scripts/release.sh v$(VERSION) master

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,11 @@ To run all tests:
229229
```
230230
go test -v ./...
231231
```
232+
233+
## Release
234+
235+
Set `GITHUB_TOKEN` and run:
236+
237+
```
238+
$ make docker-run-release
239+
```

scripts/release.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
go get github.com/aktau/github-release
4+
5+
user=databus23
6+
repo=helm-diff
7+
tag=$1
8+
commit=$2
9+
10+
github-release release -u $user -r $repo -t $tag -c $commit -n $tag
11+
12+
for f in $(ls release); do
13+
github-release upload -u $user -r $repo -t $tag -n $f -f release/$f
14+
done

0 commit comments

Comments
 (0)