-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrelease.sh
More file actions
53 lines (37 loc) · 1.45 KB
/
release.sh
File metadata and controls
53 lines (37 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
##
## Release Steps For new Annotation Support Library Version
##
export KANNOT_HOME="/d/projects/misc/kscript-annotations";
trim() { while read -r line; do echo "$line"; done; }
annot_version=$(grep '^version' ${KANNOT_HOME}/build.gradle | cut -f3 -d' ' | tr -d "'" | trim)
echo "new version is $annot_version"
### Do the github release
## see https://github.com/aktau/github-release
#source /Users/brandl/archive/gh_token.sh
source ~/archive/gh_token.sh
export GITHUB_TOKEN=${GH_TOKEN}
#echo $GITHUB_TOKEN
# make your tag and upload
cd ${KANNOT_HOME}
## make sure we have not pending commits
(git diff --ignore-submodules --exit-code && git tag "v${annot_version}") || echo "could not tag current branch"
## make sure all local changes become public
git push --tags
# check the current tags and existing releases of the repo
# binaries are located under $GOPATH/bin
export PATH=~/go/bin/:$PATH
github-release info -u holgerbrandl -r kscript-annotations
# create a formal release
github-release release \
--user holgerbrandl \
--repo kscript-annotations \
--tag "v${annot_version}" \
--name "v${annot_version}" \
--description "See [NEWS.md](https://github.com/holgerbrandl/kscript/blob/master/NEWS.md) for changes."
# --pre-release
########################################################################
### Build and publish the binary release to jcenter
gradle install
# careful with this one!
gradle bintrayUpload