-
Notifications
You must be signed in to change notification settings - Fork 9
/
release.sh
executable file
·64 lines (45 loc) · 1.08 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -e
base_dir=$(dirname "$(readlink -f "$0")")
on_exit() {
sed -i 's/^\s*debugger;/\/\/ debugger; sdfsdf/' "$base_dir"/server/node_modules/typescript/lib/typescript.js
}
trap on_exit exit
pause() {
read -r -n 1 -s -p 'Press any key to continue. . .'
echo
}
yarn
yarn upgrade
cd server
yarn upgrade
cd ../test/lsp/fixture
yarn upgrade
cd ../../..
pause
echo 'update typescript?'
pause
git fetch
changes=$(git log --reverse origin/master.. --pretty=format:"%h___%B" |grep . |sed -E 's/^([0-9a-f]{8})___(.)/- [`\1`](https:\/\/github.com\/phil294\/coffeesense\/commit\/\1) \U\2/')
echo 'CHANGES, generated from commits since last git push:'
echo "$changes"
echo "---- (put into clipboard)"
echo "$changes" |xclip -sel c
echo 'update changelog'
pause
yarn compile
yarn test
echo 'update package.json version in both . and ./server'
pause
cd server
yarn preversion
npm publish
cd ..
yarn prepare-publish
vsce package
echo 'Check VSIX'
pause
yarn
vsce publish
npx ovsx publish "$(ls -tr coffeesense-*.vsix* |tail -1)" -p "$(cat ~/.open-vsx-access-token)"
git push origin master