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(all): factor the version into clients.config.json #496

Merged
merged 6 commits into from
May 12, 2022

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented May 11, 2022

🧭 What and Why

After talk at the tech sync, we decided that spec version are irrelevant and only clients version matter, and to reduce duplication they are now defined in clients.config.json (except for js, of course).

Changes included:

  • Finally use the correct version for Java and PHP
  • Set spec version to '1.0.0' because this property is required, but will never get touched again
  • replace mainPackage by packageVersion
  • update the release script

🧪 Test

CI

@millotp millotp self-assigned this May 11, 2022
@millotp millotp requested a review from eunjae-lee May 11, 2022 15:13
@netlify
Copy link

netlify bot commented May 11, 2022

Deploy Preview for api-clients-automation canceled.

Name Link
🔨 Latest commit e27bc86
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/627cd88833103c0008a430ec

@millotp millotp requested a review from shortcuts May 11, 2022 15:13
@algolia-bot
Copy link
Collaborator

algolia-bot commented May 11, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :D

@@ -25,3 +26,11 @@ export function getTestOutputFolder(language: Language): string {
export function getCustomGenerator(language: Language): string {
return clientsConfig[language].customGenerator;
}

export function getPackageVersionDefault(language: Language): string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a description with the case for js pls?

scripts/release/process-release.ts Outdated Show resolved Hide resolved
scripts/release/process-release.ts Outdated Show resolved Hide resolved
@millotp millotp requested a review from shortcuts May 12, 2022 08:04
@@ -149,4 +153,18 @@ public static void generateServer(
System.exit(1);
}
}

// doens't work for javascript
public static String getPackageVersion(String language) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's throw an error when language.equals("javascript") with a proper explanation. We will forget this 6 months later, or someone else looking at this code will be lost.

@millotp millotp requested a review from eunjae-lee May 12, 2022 09:07
eunjae-lee
eunjae-lee previously approved these changes May 12, 2022
@millotp
Copy link
Collaborator Author

millotp commented May 12, 2022

Last review sorry I messed up with the exceptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants