forked from ngageoint/opensphere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·43 lines (37 loc) · 1.05 KB
/
release.sh
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
#!/usr/bin/env bash
set -e
echo "This script will run a release build of OpenSphere via Travis"
echo "Prereqs:"
echo " * install the travis cli utility (https://github.com/travis-ci/travis.rb#installation)"
echo " * login via: travis login --org"
token=$(travis token --org | awk '{print $NF}')
# The git.depth = false thing is because Travis, by default, clones with --depth 50. The
# semantic-release scripts will be examining git for previous release tags, and we need
# to be sure the local clone has them
body='{
"request": {
"branch": "master",
"message": "chore(release): run release build",
"config": {
"merge_mode": "deep_merge",
"git": {
"depth": false
},
"env": {
"global": {
"RELEASE": true
}
}
}
}
}'
echo ""
echo "API Response:"
curl -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Travis-API-Version: 3' \
-H "Authorization: token $token" \
-d "$body" \
https://api.travis-ci.org/repo/ngageoint%2Fopensphere/requests
echo ""