1 Star 0 Fork 2

茶密 / piskel

forked from duoyuntian / piskel 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pre-commit 564 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
# stash unstaged changes, run release task, stage release updates and restore stashed files
NAME=$(git branch | grep '*' | sed 's/* //')
# don't run on rebase
if [ $NAME != '(no branch)' ]
then
NOT_STAGED=$(git status | grep 'not staged')
# if [ "${NOT_STAGED#*not staged}" != "$NOT_STAGED" ]
if [ "$NOT_STAGED" != "" ]
then
echo "Unclean directory, aborting commit. Run git status."
exit 1
fi
grunt precommit
RETVAL=$?
if [ $RETVAL -ne 0 ]
then
echo "grunt test failed, aborting commit. Run grunt test"
exit 1
fi
fi
1
https://gitee.com/long33/piskel.git
git@gitee.com:long33/piskel.git
long33
piskel
piskel
master

搜索帮助