removed local copy of versioning installer

This commit is contained in:
Overwatch 2014-08-20 11:47:51 +02:00
parent 61fb3b1044
commit e47163718a
2 changed files with 0 additions and 27 deletions

View file

@ -1,7 +0,0 @@
#! /bin/bash
# encoding: utf-8
echo "*.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)"

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)