forked from danialfarid/ng-file-upload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·36 lines (27 loc) · 844 Bytes
/
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
echo version: $2
echo message: $1
grunt
git add .
git add -u .
git commit -am "$1"
git pull
git push
cd ../angular-file-upload-shim-bower
git add .
git add -u .
git commit -am "$2"
git pull
git push
cd ../angular-file-upload-bower
git add .
git add -u .
git commit -am "$2"
git pull
git push
API_JSON=$(printf '{"tag_name": "%s","target_commitish": "master","name": "Version %s","body": "%s","draft": false,"prerelease": false}' $2 $2 "$1")
echo commit json: $API_JSON
curl --data "$API_JSON" https://api.github.com/repos/danialfarid/ng-file-upload/releases?access_token=$3
curl --data "$API_JSON" https://api.github.com/repos/danialfarid/ng-file-upload-shim-bower/releases?access_token=$3
curl --data "$API_JSON" https://api.github.com/repos/danialfarid/ng-file-upload-bower/releases?access_token=$3
cd ../ng-file-upload
npm publish