-
Notifications
You must be signed in to change notification settings - Fork 123
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
Version check step #524
base: main
Are you sure you want to change the base?
Version check step #524
Changes from 3 commits
4cdb29b
a7083ad
78465de
fc01cff
9c0c159
1b99813
95ac5fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -26,6 +26,24 @@ jobs: | |||||||||||||||||||||||
steps: | ||||||||||||||||||||||||
- uses: actions/checkout@v4 | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
- name: Compare versions | ||||||||||||||||||||||||
working-directory: ${{ github.workspace }} | ||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||
file1="libs/client_infinity/infinity_client/pyproject.toml" | ||||||||||||||||||||||||
file2="libs/infinity_emb/pyproject.toml" | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
version1=$(grep 'version = ' "$file1" | sed 's/version = //' | tr -d '\"') | ||||||||||||||||||||||||
version2=$(grep 'version = ' "$file2" | sed 's/version = //' | tr -d '\"') | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: The grep pattern is fragile and may fail if there are comments containing 'version = ' or if the version field spans multiple lines. Consider using a TOML parser instead. |
||||||||||||||||||||||||
|
||||||||||||||||||||||||
echo "Version 1: $version1" | ||||||||||||||||||||||||
echo "Version 2: $version2" | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
if [ "$version1" != "$version2" ]; then | ||||||||||||||||||||||||
echo "Version mismatch: $version1 != $version2" | ||||||||||||||||||||||||
exit 1 | ||||||||||||||||||||||||
else | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Version comparison should handle cases where version strings are empty or malformed. Add validation before comparison.
Suggested change
|
||||||||||||||||||||||||
echo "Versions match: $version1 == $version2" | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }} | ||||||||||||||||||||||||
uses: "./.github/actions/poetry_setup" | ||||||||||||||||||||||||
with: | ||||||||||||||||||||||||
|
@@ -58,4 +76,4 @@ jobs: | |||||||||||||||||||||||
modal-deploy: | ||||||||||||||||||||||||
needs: publish-to-pypi | ||||||||||||||||||||||||
uses: ./.github/workflows/release_modal_com.yaml | ||||||||||||||||||||||||
secrets: inherit | ||||||||||||||||||||||||
secrets: inherit |
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.
style: Setting working-directory to github.workspace is redundant since the paths are already absolute. This can be removed.