Lines Matching +full:rev +full:- +full:parse
9 # http://www.apache.org/licenses/LICENSE-2.0
20 # Args: <changes-file> <output-file>
24 # - The software version deduced from the given CHANGES file.
25 # - A longer string with the project name, the software version number, and
29 # that succeeds, or "git rev-parse HEAD" if that succeeds, or otherwise a
44 # "v2023.1", "SPIRV-Tools v2023.1 0fc5526f2b01a0cc89192c10cf8bef77f1007a62, 2023-01-18T14:51:49"
45 OUTPUT_FORMAT = '"{version_tag}", "SPIRV-Tools {version_tag} {description}"\n'
92 # Match the first well-formed version-and-date line
93 # Allow trailing whitespace in the checked-out source code has
94 # unexpected carriage returns on a linefeed-only system such as
96 pattern = re.compile(r'^(v\d+\.\d+(-dev)?) \d\d\d\d-\d\d-\d\d\s*$')
109 Runs 'git describe', or alternately 'git rev-parse HEAD', in directory. If
113 success, output = command_output(["git", "rev-parse", "--show-toplevel"], repo_path)
115 … success, output = command_output(["git", "describe", "--tags", "--match=v*", "--long"], repo_path)
117 success, output = command_output(["git", "rev-parse", "HEAD"], repo_path)
140 logging.basicConfig(format="[%(asctime)s][%(levelname)-8s] %(message)s", datefmt="%H:%M:%S")
142 logging.error("usage: {} <repo-path> <output-file>".format(sys.argv[0]))