Skip to content

Commit 58f86d0

Browse files
committed
"publish: stash of uncommitted changes by release script"
1 parent 27a8d78 commit 58f86d0

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

release/core/downversion/index.ts

-3
This file was deleted.

release/utils/flags-config.ts

+37
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,43 @@ export const publish_flags_config: FlagConfig = {
119119
}
120120
},
121121
},
122+
commit_changelog: {
123+
name: 'Commit',
124+
flag: 'commit_changelog',
125+
flag_aliases: ['c'],
126+
flag_mispellings: ['cm', 'comit', 'changelog'],
127+
description: 'Whether to commit the changes to the changelogs',
128+
type: Boolean,
129+
examples: [],
130+
default_value: true,
131+
},
132+
from: {
133+
name: 'From Version',
134+
flag: 'from',
135+
flag_aliases: ['v'],
136+
flag_mispellings: ['ver'],
137+
description: 'The version from which to increment and build a strategy',
138+
type: String,
139+
examples: [],
140+
default_value: async (options: Map<string, string | number | boolean | null>) => {
141+
return (await getPublishedChannelInfo(options)).latest;
142+
},
143+
validate: async (value: unknown) => {
144+
if (typeof value !== 'string') {
145+
throw new Error(`Expected a string but got ${value}`);
146+
}
147+
if (value.startsWith('v')) {
148+
throw new Error(`Version passed to promote should not start with 'v'`);
149+
}
150+
if (semver.valid(value) === null) {
151+
throw new Error(`Version passed to promote is not a valid semver version`);
152+
}
153+
const versionInfo = semver.parse(value);
154+
if (versionInfo?.prerelease?.length) {
155+
throw new Error(`Version passed to promote cannot be prerelease version`);
156+
}
157+
},
158+
},
122159
upstream: {
123160
name: 'Update Upstream Branch',
124161
flag: 'upstream',

0 commit comments

Comments
 (0)