Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: better "from" version default value population #9238

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
"publish: stash of uncommitted changes by release script"
  • Loading branch information
runspired committed Feb 26, 2024
commit 8fbc9d02b7d13f4d629c1b2097f83182bcd8dfea
8 changes: 5 additions & 3 deletions release/utils/flags-config.ts
Original file line number Diff line number Diff line change
@@ -184,10 +184,12 @@ export const publish_flags_config: FlagConfig = {
default_value: async (options: Map<string, string | number | boolean | null>) => {
const channel = options.get('channel') as CHANNEL;
if (channel === 'lts' || channel === 'release' || channel === 'beta' || channel === 'canary') {
if (channel === 'release') {
return (await getPublishedChannelInfo()).latest;
const version = (await getPublishedChannelInfo())[channel === 'release' ? 'latest' : channel];
const currentVersion = (await getGitState(options)).rootVersion;
if (version !== currentVersion) {
return version;
}
return (await getPublishedChannelInfo())[channel];
return '';
}
return '';
},
Loading