Refreshing repository utils
parent
a060bb4e02
commit
8e5d85d464
|
@ -1,10 +1,18 @@
|
|||
#!/bin/bash
|
||||
# chmod +x .git/hooks/pre-commit
|
||||
# chmod +x util/git_hook_pre_commit.bash
|
||||
source util/increment_version.bash
|
||||
VERSION=`cat VERSION`
|
||||
VERSION=`increment_version $VERSION`
|
||||
echo -n $VERSION > VERSION
|
||||
cat VERSION | convert -background none -density 196 -fill black -pointsize 21 -resample 72 -unsharp 0x.5 text:- -trim +repage -bordercolor white -border 3 util/version.png
|
||||
git add VERSION
|
||||
git add util/version.png
|
||||
case $1 in
|
||||
"install")
|
||||
SCRIPT_DIRECTORY=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
echo -n "bash util/git_hook_pre_commit.bash execute" > $SCRIPT_DIRECTORY/../.git/hooks/pre-commit
|
||||
chmod +x $SCRIPT_DIRECTORY/../.git/hooks/pre-commit
|
||||
chmod +x $SCRIPT_DIRECTORY/git_hook_pre_commit.bash
|
||||
;;
|
||||
"execute")
|
||||
source util/increment_version.bash
|
||||
VERSION=`cat VERSION`
|
||||
VERSION=`increment_version $VERSION`
|
||||
echo -n $VERSION > VERSION
|
||||
convert -background none -density 196 -fill black -pointsize 21 -resample 72 -unsharp 0x.5 label:"$(cat VERSION)" -trim +repage -bordercolor white -border 3 util/version.png
|
||||
git add VERSION
|
||||
git add util/version.png
|
||||
;;
|
||||
esac
|
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
Loading…
Reference in New Issue