removed local copy of versioning installer

This commit is contained in:
Overwatch 2014-08-20 11:50:27 +02:00
parent 4f2d42e74a
commit 18c1cb920a
2 changed files with 0 additions and 29 deletions

View file

@ -1,9 +0,0 @@
#! /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

View file

@ -1,20 +0,0 @@
#! /bin/env python3
# encoding: utf-8
import re
import sys
REPLACEMENT = "_version = (%s, '%s') # OVER_VERSION_IDENTIFIER"
MARKER = "_version = \((\d+), '([0-9a-f]{8})'\) # OVER_VERSION_IDENTIFIER"
SUBMARKER = 'OVER_VERSION_IDENTIFIER'
if __name__ == "__main__":
action = sys.argv[1]
data = (sys.argv[2], sys.argv[3][:8]) if action == '--set' else ('0', '00000000')
for line in sys.stdin.readlines():
if SUBMARKER in line:
if re.match(MARKER, line):
line = re.sub(MARKER, REPLACEMENT %data, line)
sys.stdout.write(line)