MCPcopy Index your code
hub / github.com/nodejs/node / SetVersion

Method SetVersion

deps/v8/tools/release/common_includes.py:623–638  ·  view source on GitHub ↗
(self, version_file, prefix)

Source from the content-addressed store, hash-verified

621 self[prefix + "patch"] = patch
622
623 def SetVersion(self, version_file, prefix):
624 output = ""
625 for line in FileToText(version_file).splitlines():
626 if line.startswith("#define V8_MAJOR_VERSION"):
627 line = re.sub("\d+$", self[prefix + "major"], line)
628 elif line.startswith("#define V8_MINOR_VERSION"):
629 line = re.sub("\d+$", self[prefix + "minor"], line)
630 elif line.startswith("#define V8_BUILD_NUMBER"):
631 line = re.sub("\d+$", self[prefix + "build"], line)
632 elif line.startswith("#define V8_PATCH_LEVEL"):
633 line = re.sub("\d+$", self[prefix + "patch"], line)
634 elif (self[prefix + "candidate"] and
635 line.startswith("#define V8_IS_CANDIDATE_VERSION")):
636 line = re.sub("\d+$", self[prefix + "candidate"], line)
637 output += "%s\n" % line
638 TextToFile(output, version_file)
639
640
641class BootstrapStep(Step):

Callers 1

RunStepMethod · 0.80

Calls 3

FileToTextFunction · 0.85
TextToFileFunction · 0.85
splitlinesMethod · 0.45

Tested by

no test coverage detected