-
Notifications
You must be signed in to change notification settings - Fork 17
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(ci): manage utils package version to bump versions correctly #346
Conversation
❌ Deploy Preview for api-clients-automation failed.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
scripts/release/process-release.ts
Outdated
); | ||
} | ||
additionalProperties.packageVersion = newVersion; | ||
|
||
if (additionalProperties.utilsPackageVersion) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should initialize/update it anyway, so that people don't have to add it themselves, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're saying we should just add it if it doesn't exist there but the generator is javascript-?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, since those packages are mandatory to properly use the client and they will all have the same version, we can assume that it should always be there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could even assume that if it's not here, it should have the same value as javascript-search
for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
762c373
good idea
…s-automation into chore/js-versioning-2
if (lang === 'javascript' && nextUtilsPackageVersion) { | ||
additionalProperties.utilsPackageVersion = nextUtilsPackageVersion; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (lang === 'javascript' && nextUtilsPackageVersion) { | |
additionalProperties.utilsPackageVersion = nextUtilsPackageVersion; | |
} | |
if (lang === 'javascript') { | |
additionalProperties.utilsPackageVersion = nextUtilsPackageVersion || mainPackageUtilsVersion; | |
} |
mainPackageUtilsVersion
is openapitools['generator-cli'].generators[MAIN_PACKAGE.javascript] .additionalProperties.utilsPackageVersion
So it's initialized in case it's missing anyway? wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's worth handling it actually as the gen would throw if there's no utilsPackageVersion
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case we're not releasing javascript package, we shouldn't bump the utils version in the openapitools.json. I'll add the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks bon!
algolia/api-clients-automation#346 Co-authored-by: Eunjae Lee <karis612@gmail.com>
🧭 What and Why
🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-414
Changes included:
Solving the same problem as #340, but doing it differently, following the suggestion at #340 (comment)