Skip to content

Commit

Permalink
Update our master version to be a dev release (#2131)
Browse files Browse the repository at this point in the history
This was we can't accidentally release a real version of keras-hub
from the master branch
  • Loading branch information
mattdangerw authored Mar 7, 2025
1 parent 0cbaf0f commit c9b2ee1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Use the following steps to create an `X.Y.0` release.
of the package. Development releases will have version numbers like
`X.Y.0.dev0`, and critically will never be installed by default by `pip`.

Make a PR following [this template]([https://github.com/keras-team/keras-hub/pull/456/files](https://github.com/keras-team/keras-hub/pull/1638))
On the relase branch, check the version in `src/version_utils.py`. If the
current version is not `X.Y.0.dev0`, make a PR following [this template](https://github.com/keras-team/keras-hub/pull/1638)
to update the our version number fo look like `X.Y.0.dev0`. This PR should
base off our new release branch instead of the master branch. You can use the
following commands:
Expand Down Expand Up @@ -124,14 +125,15 @@ Use the following steps to create an `X.Y.0` release.

7. Now that our release is done, we should bump the version number on our
master branch. Let `Ŷ = Y + 1`. Our new master branch version should look
like `X.Ŷ.0`.
like `X.Ŷ.0.dev0`. We do this so that any accidental master branch releases
will be dev releases instead of being picked up by pip.

```shell
git fetch --all
git checkout --no-track -b version-bump-X.Ŷ.0 upstream/master
git checkout --no-track -b version-bump-X.Ŷ.0.dev0 upstream/master
# Update both setup.py and keras_hub/__init__.py with an editor.
git commit -m "Version bump to X.Ŷ.0"
git push -u origin version-bump-X.Ŷ.0
git commit -m "Version bump to X.Ŷ.0.dev0"
git push -u origin version-bump-X.Ŷ.0.dev0
```

Create a land a PR with this change to the master branch.
Expand Down Expand Up @@ -162,9 +164,11 @@ to push certain fixes out to our users.
of the package. Development releases will have version numbers like
`X.Y.Z.dev0`, and critically will never be installed by default by `pip`.

Make a PR following [this template](https://github.com/keras-team/keras-hub/pull/456/files)
On the relase branch, check the version in `src/version_utils.py`. If the
current version is not `X.Y.Z.dev0`, make a PR following [this template](https://github.com/keras-team/keras-hub/pull/1638)
to update the our version number fo look like `X.Y.Z.dev0`. This PR should
base off our new release branch. You can use the following commands.
base off our new release branch instead of the master branch. You can use the
following commands:

```shell
git fetch --all
Expand Down
2 changes: 1 addition & 1 deletion keras_hub/src/version_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from keras_hub.src.api_export import keras_hub_export

# Unique source of truth for the version number.
__version__ = "0.19.0"
__version__ = "0.20.0.dev0"


@keras_hub_export("keras_hub.version")
Expand Down

0 comments on commit c9b2ee1

Please sign in to comment.