1.6 KiB
1.6 KiB
Repository maintenance
Setting up a dev environment
- Clone the git repo
$ git clone git@github.com:Stepland/jubeatools.git
- Install a recent version of Python (currently 3.8 is enough)
- Install poetry (jubeatools uses poetry to deal with many aspects of the project's life-cycle)
- Install jubeatools (with dev dependencies)
$ poetry install
- Run the tests
$ poetry run pytest
- If everything went well you can now use jubeatools's commandline
$ poetry run jubeatools
Making a new release
Sanity checks before anything serious happens, from the repo's root :
- Format the code
$ poetry run sh ./utils/format_code.sh
- Run checks
$ poetry run sh ./utils/check_code.sh
- Make sure the unit tests pass
$ poetry run pytest
- Fix all encountered errors
- Rince and repeat until everythings is ok
Now that this is done you can move on to actually making a new version, while still being in the repo's root :
-
Update
CHANGELOG.md
-
Commit everything you want in the new release, including the changelog
-
Run the script
$ poetry run python utils/bump_version.py {rule}
{rule}
will usually be one ofpatch
,minor
ormajor
. But it can be anythingpoetry version
handles.Add
--commit
to let the script create the commit and tag for you as well -
Inspect the result for mistakes
-
(If you did not use
--commit
)- Commit the version-bumped files
- Add a tag with the format
vX.Y.Z
(don't forget thev
at the start)
-
Push the version bump commit and the tag
-
Build & publish
$ poetry publish --build