UNPKG

736 BPlain TextView Raw
1#!/usr/bin/env bash
2DIR=`dirname $0`
3if [ -e $DIR/../../../node_modules/.bin ]; then
4 BIN=$DIR/../../../node_modules/.bin
5else
6 BIN=$DIR/../node_modules/.bin
7fi
8if [ $# -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
14else
15 MSG="$*"
16fi
17
18set -e
19
20git add .
21git status -sb | $BIN/colorcat -sP $DIR/../cc/status.noon
22git commit -m "$MSG" | $BIN/colorcat -sP $DIR/../cc/commit.noon
23
24echo 'pushing' | $BIN/colorcat -swd
25
26git push -q 2>&1 | $BIN/colorcat -sP $DIR/../cc/push.noon
27git status -sb | $BIN/colorcat -sP $DIR/../cc/status.noon