1 | #!/usr/bin/env bash
|
2 | DIR=`dirname $0`
|
3 | if [ -e $DIR/../../../node_modules/.bin ]; then
|
4 | BIN=$DIR/../../../node_modules/.bin
|
5 | else
|
6 | BIN=$DIR/../node_modules/.bin
|
7 | fi
|
8 | if [ $# -eq 0 ]; then
|
9 | MSG="v`$BIN/sds version`"
|
10 | if [ -z "$MSG" ]; then
|
11 | echo '[ERROR] no commit message and no sds version!' | $BIN/colorcat -sp "(\[)(.+)(\])(.*) . Rfr . Rfy . Rfr . fy"
|
12 | exit 1
|
13 | fi
|
14 | else
|
15 | MSG="$*"
|
16 | fi
|
17 |
|
18 | set -e
|
19 |
|
20 | git add .
|
21 | git status -sb | $BIN/colorcat -sP $DIR/../cc/status.noon
|
22 | git commit -m "$MSG" | $BIN/colorcat -sP $DIR/../cc/commit.noon
|
23 |
|
24 | echo 'pushing' | $BIN/colorcat -swd
|
25 |
|
26 | git push -q 2>&1 | $BIN/colorcat -sP $DIR/../cc/push.noon
|
27 | git status -sb | $BIN/colorcat -sP $DIR/../cc/status.noon
|