forked from cars10/elasticvue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·38 lines (27 loc) · 916 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
36
37
38
#!/bin/bash
set -e
[ -z "$VERSION" ] && echo "You have to set a VERSION to run this script." && exit 1;
# bump version to $VERSION
sed -e "s/\"version\":\s\".*\"/\"version\": \"$VERSION\"/" -i package.json
sed -e "s/\"version\":\s\".*\"/\"version\": \"$VERSION\"/" -i browser_extension/chrome/manifest.json
sed -e "s/\"version\":\s\".*\"/\"version\": \"$VERSION\"/" -i browser_extension/firefox/manifest.json
# commit new version
git add package.json
git add browser_extension/chrome/manifest.json
git add browser_extension/firefox/manifest.json
git commit -am "bumps version to $VERSION"
# push new version
git push
# merge with master
git checkout master
git merge develop -m "automatic merge to finish v$VERSION"
# push master
git push
# tag new version
git tag -a "v$VERSION"
# push tags
git push --tags
# build chrome extension
rm -f elasticvue.zip
yarn build_browser_extensions
git checkout develop