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

Method RunStep

deps/v8/tools/release/create_release.py:32–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 MESSAGE = "Increment version number."
31
32 def RunStep(self):
33 latest_version = self.GetLatestVersion()
34
35 # The version file on main can be used to bump up major/minor at
36 # branch time.
37 self.GitCheckoutFile(VERSION_FILE, self.vc.RemoteMainBranch())
38 self.ReadAndPersistVersion("main_")
39 main_version = self.ArrayToVersion("main_")
40
41 # Use the highest version from main or from tags to determine the new
42 # version.
43 authoritative_version = sorted(
44 [main_version, latest_version], key=LooseVersion)[1]
45 self.StoreVersion(authoritative_version, "authoritative_")
46
47 # Variables prefixed with 'new_' contain the new version numbers for the
48 # ongoing candidates push.
49 self["new_major"] = self["authoritative_major"]
50 self["new_minor"] = self["authoritative_minor"]
51 self["new_build"] = str(int(self["authoritative_build"]) + 1)
52
53 # Make sure patch level is 0 in a new push.
54 self["new_patch"] = "0"
55
56 # The new version is not a candidate.
57 self["new_candidate"] = "0"
58
59 self["version"] = "%s.%s.%s" % (self["new_major"],
60 self["new_minor"],
61 self["new_build"])
62
63 print ("Incremented version to %s" % self["version"])
64
65
66class DetectLastRelease(Step):

Callers

nothing calls this directly

Calls 10

sortedFunction · 0.85
strFunction · 0.85
intFunction · 0.85
GetLatestVersionMethod · 0.80
GitCheckoutFileMethod · 0.80
ReadAndPersistVersionMethod · 0.80
ArrayToVersionMethod · 0.80
StoreVersionMethod · 0.80
printFunction · 0.50
RemoteMainBranchMethod · 0.45

Tested by

no test coverage detected