MCPcopy Index your code
hub / github.com/desktop/desktop / printInstructions

Function printInstructions

script/draft-release/run.ts:51–75  ·  view source on GitHub ↗

* Prints out next steps to the console * * @param nextVersion version for the next release * @param entries release notes for the next release

(nextVersion: string, entries: Array<string>)

Source from the content-addressed store, hash-verified

49 * @param entries release notes for the next release
50 */
51function printInstructions(nextVersion: string, entries: Array<string>) {
52 const baseSteps = [
53 'Revise the release notes according to https://github.com/desktop/desktop/blob/development/docs/process/writing-release-notes.md',
54 'Lint them with: yarn draft-release:format',
55 'Commit these changes (on a "release" branch) and push them to GitHub',
56 'See the deploy repo for details on performing the release: https://github.com/desktop/deploy',
57 ]
58 // if an empty list, we assume the new entries have already been
59 // written to the changelog file
60 if (entries.length === 0) {
61 printSteps(baseSteps)
62 } else {
63 const object = { [nextVersion]: entries.sort() }
64 const steps = [
65 `Concatenate this to the beginning of the 'releases' element in the changelog.json as a starting point:\n${format(
66 JSON.stringify(object),
67 {
68 parser: 'json',
69 }
70 )}\n`,
71 ...baseSteps,
72 ]
73 printSteps(steps)
74 }
75}
76
77/**
78 * adds a number to the beginning of each line and prints them in sequence

Callers 1

runFunction · 0.85

Calls 2

printStepsFunction · 0.85
formatFunction · 0.85

Tested by

no test coverage detected