forked from fossasia/meilix-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.sh
executable file
·31 lines (30 loc) · 942 Bytes
/
script.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
#!/bin/bash
cat travis_tokens | while read line;
do
array=(${line})
user="${array[0]}"
project="${array[1]}"
len=${#array[@]}
for ((i=2; i<len; i++)); do
branch="${array[i]}"
body="{\"request\":{
\"branch\":\"${branch}\",
\"config\":{
\"env\":{
\"email\":\"${email}\",
\"TRAVIS_TAG\":\"${TRAVIS_TAG}\",
\"event_url\":\"${event_url}\",
\"TRAVIS_SCRIPT\":\"${TRAVIS_SCRIPT}\"
}
}
}}"
echo "Sending Data To travis To build ISO"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${KEY}" \
-d "${body}" \
"https://api.travis-ci.org/repo/${user}%2F${project}/requests"
done
done