MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / version_string

Function version_string

tools/cmdline.py:124–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122
123
124def version_string():
125 # if the emscripten folder is not a git repo, don't run git show - that can
126 # look up and find the revision in a parent directory that is a git repo
127 revision_suffix = ''
128 if os.path.exists(utils.path_from_root('.git')):
129 git_rev = utils.run_process(
130 ['git', 'rev-parse', 'HEAD'],
131 stdout=PIPE, stderr=PIPE, cwd=utils.path_from_root()).stdout.strip()
132 revision_suffix = ' (%s)' % git_rev
133 elif os.path.exists(utils.path_from_root('emscripten-revision.txt')):
134 rev = read_file(utils.path_from_root('emscripten-revision.txt')).strip()
135 revision_suffix = ' (%s)' % rev
136 return f'emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) {utils.EMSCRIPTEN_VERSION}{revision_suffix}'
137
138
139def is_valid_abspath(path_name):

Callers 1

parse_argsFunction · 0.85

Calls 3

read_fileFunction · 0.90
existsMethod · 0.80
run_processMethod · 0.80

Tested by

no test coverage detected