Skip to content

Commit a0130d1

Browse files
wyliNic-Ma
andauthored
3018 enhance version string check (#3022)
* 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]>
1 parent a477905 commit a0130d1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,17 @@ jobs:
144144
run: |
145145
# get tag info for versioning
146146
mv _version.py monai/
147+
# version checks
148+
target="\"version\": \"$RELEASE_VERSION\""
149+
echo $target
150+
local=`grep "\"version\"" monai/_version.py
151+
echo $local
152+
if [ "$local" = "$target" ]; then
153+
echo "matched version string"
154+
else
155+
echo "unmatched version string, please check the main branch"
156+
exit 1
157+
fi
147158
# remove flake package as it is not needed on hub.docker.com
148159
sed -i '/flake/d' requirements-dev.txt
149160
docker build -t projectmonai/monai:"$RELEASE_VERSION" -f Dockerfile .

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ When major features are ready for a milestone, to prepare for a new release:
289289
repository's artifacts (e.g. the file at https://github.com/Project-MONAI/MONAI/actions/runs/66570977).
290290
- Check the release test at [TestPyPI](https://test.pypi.org/project/monai/), download the artifacts when the CI finishes.
291291
- Optionally run [the cron testing jobs](https://github.com/Project-MONAI/MONAI/blob/dev/.github/workflows/cron.yml) on `releasing/[version number]`.
292+
- Rebase `releasing/[version number]` to `main`, make sure all the test pipelines succeed.
292293
- Once the release candidate is verified, tag and push a milestone, for example, `git push origin 0.1.0`.
293294
The tag must be with the latest commit of `releasing/[version number]`.
294-
- Rebase `releasing/[version number]` to `main`, make sure all the test pipelines succeed.
295295
- Upload the packages to [PyPI](https://pypi.org/project/monai/).
296296
This could be done manually by ``twine upload dist/*``, given the artifacts are unzipped to the folder ``dist/``.
297297
- Merge `releasing/[version number]` to `dev`, this step must make sure that the tagging commit unchanged on `dev`.

0 commit comments

Comments
 (0)