-
Notifications
You must be signed in to change notification settings - Fork 0
Use dynamic versioning #15
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
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
58a20fb
update pyproject
giograno b2579f6
dynamic versions + lock file update
giograno 5584d43
update mustache template
giograno 35f8973
Omit version from the workspace package
giograno 9f39226
fix versioning issue
giograno b404162
nicer user agent name
giograno f34b9a3
lint
giograno 5efbc32
simple test for version in the user-agent
giograno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,12 @@ | ||
| #!/bin/bash | ||
|
|
||
| version=$(cat VERSION) | ||
|
|
||
| docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.10.0 generate \ | ||
| -i https://raw.githubusercontent.com/localstack/openapi/refs/heads/main/openapi/emulators/localstack-spec-latest.yml \ | ||
| --skip-validate-spec \ | ||
| -g python \ | ||
| -o /local//packages/localstack-sdk-generated \ | ||
| --global-property models,apis,supportingFiles \ | ||
| -p packageName=localstack.sdk \ | ||
| -p packageVersion=$version \ | ||
| --template-dir /local/packages/localstack-sdk-generated/templates \ | ||
| --global-property apiTests=false,modelTests=false \ | ||
| --global-property apiDocs=false,modelDocs=False | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I wanted to do
version=$(uvx --from setuptools-scm python -m setuptools_scm)but the version is hardcoded in the source when we generate the code (nothing major, only logs). One option was to change the mustache template, but I think it's too much hassle for this.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.
question: Could you elaborate on this one? Is this basically a "chicken egg problem"?
setuptools_scmneeds a tag, a tag needs a comment, a commit needs the code, the code needs the version fromsetuptools_scm?If so, what's the takeaway? This could be a strong counter-argument not to use
setuptools_scmin the first place, or could be neglected because it's not important?If this is not going to be set, then it would at least make sense to use a partial workaround (by using the
httpUserAgentsetting).But it would be very interesting to see which versions of the SDK are actually being used to communicate with the LocalStack runtime, so a proper versioning in the http user agent could be quite beneficial...