This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup-travis.sh
executable file
·57 lines (48 loc) · 2.28 KB
/
setup-travis.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
set -eu
source .travis.env
# Needs:
# TRAVIS_TOKEN=
# CI_AUTHOR_EMAIL=
# CI_AUTHOR_NAME=
# CI_GH_TOKEN=
# CI_NPM_TOKEN=
# CI_REPO=
curl --silent --show-error --fail -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "{ \"env_var.name\": \"GIT_AUTHOR_EMAIL\", \"env_var.value\": \"$CI_AUTHOR_EMAIL\", \"env_var.public\": false, \"env_var.branch\": \"master\" }" \
https://api.travis-ci.com/repo/$CI_REPO/env_vars
curl --silent --show-error --fail -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "{ \"env_var.name\": \"GIT_COMMITTER_EMAIL\", \"env_var.value\": \"$CI_AUTHOR_EMAIL\", \"env_var.public\": false, \"env_var.branch\": \"master\" }" \
https://api.travis-ci.com/repo/$CI_REPO/env_vars
curl --silent --show-error --fail -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "{ \"env_var.name\": \"GIT_AUTHOR_NAME\", \"env_var.value\": \"$CI_AUTHOR_NAME\", \"env_var.public\": false, \"env_var.branch\": \"master\" }" \
https://api.travis-ci.com/repo/$CI_REPO/env_vars
curl --silent --show-error --fail -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "{ \"env_var.name\": \"GIT_COMMITTER_NAME\", \"env_var.value\": \"$CI_AUTHOR_NAME\", \"env_var.public\": false, \"env_var.branch\": \"master\" }" \
https://api.travis-ci.com/repo/$CI_REPO/env_vars
curl --silent --show-error --fail -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "{ \"env_var.name\": \"GH_TOKEN\", \"env_var.value\": \"$CI_GH_TOKEN\", \"env_var.public\": false, \"env_var.branch\": \"master\" }" \
https://api.travis-ci.com/repo/$CI_REPO/env_vars
curl --silent --show-error --fail -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "{ \"env_var.name\": \"NPM_TOKEN\", \"env_var.value\": \"$CI_NPM_TOKEN\", \"env_var.public\": false, \"env_var.branch\": \"master\" }" \
https://api.travis-ci.com/repo/$CI_REPO/env_vars
rm .travis.env
rm setup-travis.sh