Skip to content

Commit 8d06e24

Browse files
committed
updated release protocol to include sdkman update
1 parent 3e6df07 commit 8d06e24

File tree

1 file changed

+56
-10
lines changed

1 file changed

+56
-10
lines changed
Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
## Release Checklist
22

3-
1. Increment version in `kscript`
4-
2. Make sure that support api version is up to date and available from jcenter
5-
3. Push and create github release tag
6-
```bash
7-
export KSCRIPT_HOME="/Users/brandl/projects/kotlin/kscript";
3+
# 1. Increment version in `kscript`
4+
# 2. Make sure that support api version is up to date and available from jcenter
5+
# 3. Push and create github release tag
6+
7+
export KSCRIPT_HOME="/Users/brandl/projects/kotlin/kscript";
88
export PATH=${KSCRIPT_HOME}:${PATH}
99
export PATH=~/go/bin/:$PATH
1010

11+
KSCRIPT_ARCHIVE=~/Dropbox/archive/kscript_versions/
12+
1113

1214
kscript_version=$(grep '^KSCRIPT_VERSION' ${KSCRIPT_HOME}/kscript | cut -f2 -d'=')
1315
echo "new version is $kscript_version"
@@ -19,7 +21,6 @@ echo "new version is $kscript_version"
1921

2022

2123
## create and upload deployment file for sdkman
22-
KSCRIPT_ARCHIVE=~/Dropbox/archive/kscript_versions/
2324

2425
mkdir -p $KSCRIPT_ARCHIVE/kscript-${kscript_version}/bin
2526
cp ${KSCRIPT_HOME}/kscript ${KSCRIPT_ARCHIVE}/kscript-${kscript_version}/bin
@@ -33,8 +34,9 @@ open ${KSCRIPT_ARCHIVE}
3334
### Do the github release
3435

3536
## create tag on github
36-
#github-release --help
37+
#github-release --help
3738

39+
source /Users/brandl/Dropbox/archive/gh_token.sh
3840
export GITHUB_TOKEN=${GH_TOKEN}
3941
#echo $GITHUB_TOKEN
4042

@@ -55,7 +57,7 @@ github-release release \
5557
--tag "v${kscript_version}" \
5658
--name "v${kscript_version}" \
5759
--description "See [NEWS.md](https://github.com/holgerbrandl/kscript/blob/master/NEWS.md) for changes."
58-
# \\
60+
# \
5961
# --pre-release
6062

6163

@@ -91,6 +93,50 @@ git push origin releases
9193
########################################################################
9294
### release on sdkman
9395

94-
#TBD
96+
## see docs http://sdkman.io/vendors.html
97+
# Summary: sequence of calls is as above, first **releasing** , then making it **default** , and finally **announce** it to the world.
98+
99+
## from .bash_profile
100+
source /Users/brandl/Dropbox/archive/kscript_sdkman_json.sh
101+
echo ${SDKMAN_CONSUMER_KEY} ${SDKMAN_CONSUMER_TOKEN} ${kscript_version}
102+
#echo ${SDKMAN_CONSUMER_KEY} | cut -c-5
103+
#echo ${SDKMAN_CONSUMER_TOKEN} | cut -c-5
104+
105+
106+
## test the binary download
107+
#cd ~/Desktop
108+
#wget https://github.com/holgerbrandl/kscript/releases/download/v${kscript_version}/kscript-${kscript_version}-bin.zip
109+
#unzip kscript-${kscript_version}-bin.zip
110+
111+
#kscript_version=1.5.1
112+
113+
curl -X POST \
114+
-H "'Consumer-Key: ${SDKMAN_CONSUMER_KEY}" \
115+
-H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
116+
-H "Content-Type: application/json" \
117+
-H "Accept: application/json" \
118+
-d '{"candidate": "kscript", "version": "'${kscript_version}'", "url": "https://github.com/holgerbrandl/kscript/releases/download/v'${kscript_version}'/kscript-'${kscript_version}'-bin.zip"}' \
119+
https://vendors.sdkman.io/release
120+
121+
curl -X POST -H "Consumer-Key: ${SDKMAN_CONSUMER_KEY}" -H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"candidate": "kscript", "version": "1.5.1", "url": "https://github.com/holgerbrandl/kscript/releases/download/v1.5.1/kscript-1.5.1-bin.zip"}' https://vendors.sdkman.io/release
122+
123+
124+
## Set existing Version as Default for Candidate
125+
126+
curl -X PUT \
127+
-H "Consumer-Key: ${SDKMAN_CONSUMER_KEY}" \
128+
-H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
129+
-H "Content-Type: application/json" \
130+
-H "Accept: application/json" \
131+
-d '{"candidate": "kscript", "version": "'${kscript_version}'"}' \
132+
https://vendors.sdkman.io/default
133+
134+
## Broadcast a Structured Message
135+
curl -X POST \
136+
-H "Consumer-Key: ${SDKMAN_CONSUMER_KEY}" \
137+
-H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
138+
-H "Content-Type: application/json" \
139+
-H "Accept: application/json" \
140+
-d '{"candidate": "kscript", "version": "'${kscript_version}'", "hashtag": "kscript"}' \
141+
https://vendors.sdkman.io/announce/struct
95142

96-
```

0 commit comments

Comments
 (0)