Skip to content

[cli][script] Fix misspelling in cli bootstrapping script #4356

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

Merged
merged 1 commit into from
Nov 3, 2019

Conversation

jimschubert
Copy link
Member

@jimschubert jimschubert commented Nov 3, 2019

Fixes a misspelling in the cache directory environment variable introduced in #3631, warning users that they need to migrate to the properly spelled variable.

Also creates the directory if it doesn't exist.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@auto-labeler
Copy link

auto-labeler bot commented Nov 3, 2019

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@jimschubert
Copy link
Member Author

@RonnyPfannschmidt just an FYI

@jimschubert
Copy link
Member Author

This can be tested with:

OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR="$(pwd)/.bak/dowload" bash bin/utils/openapi-generator-cli.sh help
ls .bak/dowload
OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR="$(pwd)/.bak/download" bash bin/utils/openapi-generator-cli.sh help
ls .bak/download
bash bin/utils/openapi-generator-cli.sh help
ls bin/utils/openapi-generator-cli*

Then, test with another version:

export OPENAPI_GENERATOR_VERSION=4.1.0

And repeat the validations to verify.

@jimschubert
Copy link
Member Author

@OpenAPITools/generator-core-team (since there's no technical committee for helper scripts)

Copy link
Contributor

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

yikes, what an oversight on my side, thanks for catching and applying a roundabout solution

@jimschubert jimschubert merged commit b536119 into OpenAPITools:master Nov 3, 2019
@jimschubert jimschubert deleted the fix-cli-script branch November 3, 2019 21:47
@jimschubert
Copy link
Member Author

No problem... It happens! Sorry I wasn't able to review the original PR. I've been playing catch-up for a few months.

@jimschubert jimschubert added this to the 4.2.1 milestone Nov 3, 2019
@wing328
Copy link
Member

wing328 commented Nov 4, 2019

This can be tested with:

OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR="$(pwd)/.bak/dowload" bash bin/utils/openapi-generator-cli.sh help
ls .bak/dowload
OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR="$(pwd)/.bak/download" bash bin/utils/openapi-generator-cli.sh help
ls .bak/download
bash bin/utils/openapi-generator-cli.sh help
ls bin/utils/openapi-generator-cli*

@jimschubert what about adding it to the CI somehow? (assuming it's not a lot of work)

@jimschubert
Copy link
Member Author

@wing328 This script just calls maven to get the .jar and (now) supports two environment variables. I don't think there's anything beneficial to test on every build for this. Manual testing on PR merges should suffice.

@wing328
Copy link
Member

wing328 commented Nov 4, 2019

@jimschubert agreed. If it gains more activity/usage, we may consider adding a test to the CI later

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

Successfully merging this pull request may close these issues.

3 participants