-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sh
55 lines (39 loc) · 939 Bytes
/
publish.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
#!/bin/sh
echo '1. update docs'
echo '2. reflected changes in todo.txt'
echo '3. update autocompletions'
echo 'confirm pusblish?'
read null
# building files
cd ~/pipe-script
# compiling docs
sh docs/compile.sh || exit
echo "building interpreter"
npm run buildi || exit
echo 'building compiler'
npm run buildc || exit
echo 'TESTING'
sh test.sh || exit
echo "building website"
cd website
npm run build || exit
cd ..
update-npm
# commit to git
git add .
git commit -m 'publishing'
# publishing
npm version minor || exit
echo "publishing"
npm publish || exit
# pushing to master
git push origin master || exit
echo "merging master --> release"
curl \
-X POST \
-u "AyushmanTripathy":$(cat ~/.pat/git) \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/AyushmanTripathy/pipe-script/merges" \
-d '{"base":"release","head":"master"}' | exit
echo "merge complete"
echo 'successfully published'