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
28 # rev-parse HEAD" if that succeeds, or otherwise a message containing the
43 # "v2023.1", "SPIRV-Tools v2023.1 0fc5526f2b01a0cc89192c10cf8bef77f1007a62, 2023-01-18T14:51:49"
44 OUTPUT_FORMAT = '"{version_tag}", "SPIRV-Tools {version_tag} {description}"\n'
91 # Match the first well-formed version-and-date line
92 # Allow trailing whitespace in the checked-out source code has
93 # unexpected carriage returns on a linefeed-only system such as
95 pattern = re.compile(r'^(v\d+\.\d+(-dev)?) \d\d\d\d-\d\d-\d\d\s*$')
108 Runs 'git describe', or alternately 'git rev-parse HEAD', in directory. If
112 success, output = command_output(["git", "rev-parse", "--show-toplevel"], repo_path)
114 … success, output = command_output(["git", "describe", "--tags", "--match=v*", "--long"], repo_path)
116 success, output = command_output(["git", "rev-parse", "HEAD"], repo_path)
139 logging.basicConfig(format="[%(asctime)s][%(levelname)-8s] %(message)s", datefmt="%H:%M:%S")
141 logging.error("usage: {} <repo-path> <output-file>".format(sys.argv[0]))