added automatic version stamping
This commit is contained in:
parent
0fb3276b9f
commit
4f2d42e74a
4 changed files with 36 additions and 2 deletions
9
deploy-versioning.sh
Executable file
9
deploy-versioning.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#! /bin/bash
|
||||
# encoding: utf-8
|
||||
|
||||
echo "version.py filter=version" >> .git/info/attributes
|
||||
ln -fs ../version-tool.py .git/version-tool.py
|
||||
git config --local filter.version.clean "python3 ./.git/version-tool.py --clean"
|
||||
git config --local filter.version.smudge "python3 ./.git/version-tool.py --set \$(git rev-list HEAD --count) \$(git rev-parse HEAD)"
|
||||
echo '#! /bin/bash\n\nexec git checkout HEAD -- version.py' > .git/hooks/post-commit
|
||||
chmod +x .git/hooks/post-commit
|
Loading…
Add table
Add a link
Reference in a new issue