From 18c1cb920a56625e61b9424be64cdb2cff80b68a Mon Sep 17 00:00:00 2001 From: Overwatch Date: Wed, 20 Aug 2014 11:50:27 +0200 Subject: [PATCH] removed local copy of versioning installer --- deploy-versioning.sh | 9 --------- version-tool.py | 20 -------------------- 2 files changed, 29 deletions(-) delete mode 100755 deploy-versioning.sh delete mode 100755 version-tool.py diff --git a/deploy-versioning.sh b/deploy-versioning.sh deleted file mode 100755 index e84eee8..0000000 --- a/deploy-versioning.sh +++ /dev/null @@ -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 diff --git a/version-tool.py b/version-tool.py deleted file mode 100755 index dd13bfc..0000000 --- a/version-tool.py +++ /dev/null @@ -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)