-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.sh
executable file
·31 lines (21 loc) · 974 Bytes
/
deploy.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
#!/usr/bin/env bash
if [[ `git status --porcelain` ]]; then
echo "Please commit your changes."
exit 1
fi
CURRENT_VERSION=$(grep -e '"version": ' extension/manifest.json | cut -d \" -f 4)
NEXT_VERSION=$(echo ${CURRENT_VERSION} | cut -d . -f 1).$(($(echo ${CURRENT_VERSION} | cut -d . -f 2) + 1))
echo "Bumping version number: $CURRENT_VERSION -> $NEXT_VERSION"
#cat extension/manifest.json | sed -e "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEXT_VERSION\"/g"
sed -i '' -e "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEXT_VERSION\"/g" extension/manifest.json
cp -r extension tempdir
cat extension/popup.html | sed -e "s/{{version}}/v. $NEXT_VERSION/g" > tempdir/popup.html
cd tempdir
zip tempfile.zip *
cd ..
cp tempdir/tempfile.zip extension.zip
rm -rf tempdir
git add extension/manifest.json
git commit -m "Bumping version number to $NEXT_VERSION"
git tag "version-$NEXT_VERSION"
open https://chrome.google.com/webstore/developer/dashboard