diff --git a/.github/workflows/cd-release.yaml b/.github/workflows/cd-release.yaml index 8f64e36d..f566cebe 100644 --- a/.github/workflows/cd-release.yaml +++ b/.github/workflows/cd-release.yaml @@ -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 @@ -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: | diff --git a/justfile b/justfile index d8b2d851..2198aa53 100644 --- a/justfile +++ b/justfile @@ -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 @@ -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" # --------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/upgrade_version_matrix.py b/scripts/upgrade_version_matrix.py index 20e92854..17c9ec7e 100644 --- a/scripts/upgrade_version_matrix.py +++ b/scripts/upgrade_version_matrix.py @@ -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() ] ) diff --git a/syftbox/server2client_version.json b/syftbox/server2client_version.json index 9cfa1224..3f525eb8 100644 --- a/syftbox/server2client_version.json +++ b/syftbox/server2client_version.json @@ -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", ""] }