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

Upgrade matrix #531

Merged
merged 6 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/cd-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
- minor
- major

breaking_changes:
description: Use this if minor release and not compatible with previous versions
type: boolean
default: false

run_tests:
description: Run pre-release tests
type: boolean
Expand Down Expand Up @@ -82,7 +87,7 @@ jobs:

- name: Bump the Version
run: |
just bump-version ${{ inputs.bump_type }}
just bump-version ${{ inputs.bump_type }} ${{ breaking_changes }}

- name: Build syftbox
run: |
Expand Down
12 changes: 9 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ install:

# Bump version, commit and tag
[group('build')]
bump-version level="patch":
bump-version level="patch" breaking_changes="false":
#!/bin/bash
# We need to uv.lock before we can commit the whole thing in the repo.
# DO not bump the version on the uv.lock file, else other packages with same version might get updated
Expand All @@ -148,12 +148,18 @@ bump-version level="patch":
# first bump version
uv run bump2version {{ level }}

# upgrade version compatibility matrix
cd scripts
BREAKING_CHANGES=""
if [[ '{{ breaking_changes }}' == true ]]; then BREAKING_CHANGES="--breaking_changes"; fi
uv run upgrade_version_matrix.py {{ level }} $BREAKING_CHANGES
cd ..
# update uv.lock file to reflect new package version
uv lock

# commit the changes
git commit -am "Bump version $CURRENT_VERSION -> $NEW_VERSION"
git tag -a $NEW_VERSION -m "Release $NEW_VERSION"
# git commit -am "Bump version $CURRENT_VERSION -> $NEW_VERSION"
# git tag -a $NEW_VERSION -m "Release $NEW_VERSION"

# ---------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion scripts/upgrade_version_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
json_file.write(
",\n".join(
[
f"""\t"{key}": ["{version_range[0]}", "{version_range[1]}"]"""
f""" "{key}": ["{version_range[0]}", "{version_range[1]}"]"""
for key, version_range in version_matrix.items()
]
)
Expand Down
3 changes: 2 additions & 1 deletion syftbox/server2client_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"0.2.9": ["0.2.0", "0.3.0"],
"0.2.10": ["0.2.0", "0.3.0"],
"0.2.11": ["0.2.0", "0.3.0"],
"0.3.0": ["0.3.0", ""]
"0.3.0": ["0.3.0", ""],
"0.3.1": ["0.3.0", ""]
}