Skip to content

Commit

Permalink
3018 enhance version string check (#3022)
Browse files Browse the repository at this point in the history
* enhance the release version string check

Signed-off-by: GitHub <[email protected]>

* update the releasing steps

Signed-off-by: GitHub <[email protected]>

Co-authored-by: Nic Ma <[email protected]>
  • Loading branch information
wyli and Nic-Ma authored Sep 27, 2021
1 parent a477905 commit a0130d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ jobs:
run: |
# get tag info for versioning
mv _version.py monai/
# version checks
target="\"version\": \"$RELEASE_VERSION\""
echo $target
local=`grep "\"version\"" monai/_version.py
echo $local
if [ "$local" = "$target" ]; then
echo "matched version string"
else
echo "unmatched version string, please check the main branch"
exit 1
fi
# remove flake package as it is not needed on hub.docker.com
sed -i '/flake/d' requirements-dev.txt
docker build -t projectmonai/monai:"$RELEASE_VERSION" -f Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ When major features are ready for a milestone, to prepare for a new release:
repository's artifacts (e.g. the file at https://github.com/Project-MONAI/MONAI/actions/runs/66570977).
- Check the release test at [TestPyPI](https://test.pypi.org/project/monai/), download the artifacts when the CI finishes.
- Optionally run [the cron testing jobs](https://github.com/Project-MONAI/MONAI/blob/dev/.github/workflows/cron.yml) on `releasing/[version number]`.
- Rebase `releasing/[version number]` to `main`, make sure all the test pipelines succeed.
- Once the release candidate is verified, tag and push a milestone, for example, `git push origin 0.1.0`.
The tag must be with the latest commit of `releasing/[version number]`.
- Rebase `releasing/[version number]` to `main`, make sure all the test pipelines succeed.
- Upload the packages to [PyPI](https://pypi.org/project/monai/).
This could be done manually by ``twine upload dist/*``, given the artifacts are unzipped to the folder ``dist/``.
- Merge `releasing/[version number]` to `dev`, this step must make sure that the tagging commit unchanged on `dev`.
Expand Down

0 comments on commit a0130d1

Please sign in to comment.