aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/update_version
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/update_version')
-rwxr-xr-xscripts/update_version38
1 files changed, 0 insertions, 38 deletions
diff --git a/scripts/update_version b/scripts/update_version
deleted file mode 100755
index 9c618fa6..00000000
--- a/scripts/update_version
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-# -----------------------------------------------------------------------------
-# @file: add_version_headers
-#
-# Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
-# MIT License, see LICENSE file for more details.
-# -----------------------------------------------------------------------------
-
-
-import os
-import re
-import sys
-
-
-def main(argv):
- cwd = os.path.join(os.getcwd(), argv[2])
- cmake = os.path.join(cwd, "CMakeLists.txt")
- doxyfile = os.path.join(cwd, "docs", "Doxyfile")
-
- with open(cmake, "r+") as f_:
- src = f_.read()
- f_.seek(0)
- src = re.sub(r"(project\(\w+\s+VERSION\s+)[0-9.]+", r"\g<1>{0}.0".format(argv[1]), src, re.MULTILINE)
- f_.write(src)
- f_.truncate()
-
- with open(doxyfile, "r+") as f_:
- src = f_.read()
- f_.seek(0)
- src = re.sub(r"(PROJECT_NUMBER\s+=\s+v)[0-9.]+", r"\g<1>{0}".format(argv[1]), src, re.MULTILINE)
- f_.write(src)
- f_.truncate()
-
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main(sys.argv))