-
Notifications
You must be signed in to change notification settings - Fork 1
Creating a new release
This page describes the deployment process for chmutil
NOTE: THESE INSTRUCTIONS ARE FOR DOING A RELEASE ONLY AND NOT FOR REGULAR COMMITS
Before deploy verify code is working by invoking:
make coverage
The above command runs the unit tests and calculates code coverage of the unit tests.
make test
All tests should pass
make lint
Lint should not complain
Before doing a release, the code must be assigned a new version, committed to github, and tagged in the github repo.
First run git tag to find the latest version. Pick the next highest version number. The tags in github start with v because versions cannot start with numeric value.
git tag example:
$ git tag
v0.2.0
v0.3.0
v0.4.0
Now update the chmutil/init.py and setup.py with a new version. Omit the v when setting the version.
Commit the above changes and push to master:
git commit -m 'message...' chmutil/__init__.py setup.py
git push origin master
Now tag source with version:
git tag -a v0.4.0 -m 'Information describing release'
Don't worry if you screw up you can add commit more changes, push those changes and then perform git tag adding -f flag for change the tag (Warning: don't do this if you have pushed the tag which is the next step)
Push the tag to github:
git push origin v0.4.0
Verify unit tests pass on travis
Click on this link travis and verify unit tests are passing for the new version committed in the previous step. If not fix issues and start over at the top.
The tag should be visible from github now. If not something is wrong.
From chmutil source tree generate the wheel and tar.gz files
make dist
Under dist/ will be files such as these:
$ tree
dist
|-- chmutil-1.3.2-py2.py3-none-any.whl
`-- chmutil-1.3.2.tar.gz
Be sure to add release notes to HISTORY.rst file in source tree
- From https://github.com/CRBS/chmutil click on releases link.
- Click on the Draft a new release button.
- In the Tag version field select the version set above.
- Enter a release title and describe changes in release copying notes put into HISTORY.rst.
- Attach distributable binaries created above to release via the Attach binaries link on the page.
- Click publish release.
First deploy to pypi test server by running this:
make testrelease
Once the above is done verify deploy was successful by browsing to https://testpypi.python.org/pypi/chmutil and verifying new release was deployed.
Also test the package by installing it locally by running this:
sudo pip install -i https://testpypi.python.org/pypi chmutil
createchmjob.py --version
NOTE: If there is a problem a new version will need to be tagged in source tree cause pypi does not allow updating of deployed versions.
If the above works perform the formal release by running:
make release
Now test it by running this on a local machine:
sudo pip install chmutil
celpprunner.py --version
ssh <REMOTE HOST>
sudo -u root /bin/bash
pip install chmutil
NOTE: To remove chmutil one can call pip uninstall chmutil
Check code updated by running createchmjob.py with --version flag. The version should match the one set earlier.
createchmjob.py --version