forked from sqlpad/sqlpad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.sh
More file actions
executable file
·38 lines (28 loc) · 774 Bytes
/
Copy pathversion.sh
File metadata and controls
executable file
·38 lines (28 loc) · 774 Bytes
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
#!/usr/bin/env sh
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" != "master" ]]; then
echo 'Branch must be set to master';
exit 1;
fi
SQLPAD_ROOT_DIR=$(pwd)
SQLPAD_CLIENT_DIR=$(pwd)/client
SQLPAD_SERVER_DIR=$(pwd)/server
SCRIPTS_DIR=$(pwd)/scripts
if [[ ! -d $SCRIPTS_DIR ]] || \
[[ ! -d $SQLPAD_CLIENT_DIR ]] || \
[[ ! -d $SQLPAD_SERVER_DIR ]]
then
echo This script must be executed from the sqlpad project directory
exit 1
fi
VERSION=$1
cd $SQLPAD_CLIENT_DIR
npm --no-git-tag-version version $VERSION
cd $SQLPAD_SERVER_DIR
npm --no-git-tag-version version $VERSION
cd $SQLPAD_ROOT_DIR
npm --no-git-tag-version version $VERSION
git commit -a -m "v$VERSION"
git tag -a "v$VERSION" -m "v$VERSION"
git push origin master
git push --tags