-
Notifications
You must be signed in to change notification settings - Fork 24
Creating a Release
To create a new release of smartmeter-datacollector
and / or smartmeter-datacollector-configurator
a few manual steps have to be performed.
- Make sure you are on the
master
branch in the Git repository - Make sure that the software works and is ready for a new release
- Make sure all unit tests pass using
pipenv run test
- Make sure the following commands pass:
pipenv run format_check
pipenv run isort_check
pipenv run lint_check
pipenv run setup_check
-
pipenv run license
(only forsmartmeter-datacollector
) pipenv run build
pipenv run build_check
pipenv run build_srcdeb
pipenv run build_deb
- Make sure all unit tests pass using
- Bump the version in
smartmeter-datacollector|smartmeter-datacollector-configurator/__version__.py
and stage the changes withgit
. Make sure to follow Semantic Versioning. - Update the
debian/
directory- Run
pipenv run debianize
- Manually update
debian/changelog
with an additional changelog entry (don't remove the older entries). See also debian/changelog for more details. - Make sure the other files in the
debian/
directory are up-to-date and in the proper syntax. - Stage all necessary changes to the files in the
debian/
directory withgit
.
- Run
- Commit the staged changes using:
git commit -m "release vX.Y.Z"
- Create a new tag in the git repository using
git tag vX.Y.Z
- Push the release commit and the new tag to the Git repository's remote using
git push --tags origin master
Once the release commit and tag have been pushed to GitHub the GitHub Action workflows specified in the repository will be executed. Some of these workflows contain special handling for new Git tags which will result in a new draft release being automatically generated. Once all GitHub Action workflows passed go to the release overview and modify the new draft release. All you have to do is fill in the description of the release (usually a summary of new features, improvements and bugfixes) and publish the release. The GitHub Action workflows have already taken care of attaching all necessary (binary) packages to the release. In total the release should contain the following attachments:
- Debian package for
amd64
- Debian package for
armhf
- Python source package (
.tar.gz
) - Python wheel package (
.whl
)
To also provide a new Raspberry Pi image for the smartmeter-datacollector
demo follow these instructions:
- Make sure you are on the
smartmeter-datacollector-demo
branch of the smartmeter-datacollector-pi-gen Git repository. - Update the version of
python3-smartmeter-datacollector_*_armhf.deb
and / orpython3-smartmeter-datacollector-configurator_*_armhf.deb
instage2/99-install-smartmeter-demo/00-run.sh
to match the new release(s). Beware that the version appears twice in the GitHub URL to the release artifact(s). - Stage the changes to
stage2/99-install-smartmeter-demo/00-run.sh
withgit
and commit them usinggit commit -m "bump <smartmeter-datacollector|smartmeter-datacollector-configurator> to vX.Y.Z"
- Push the release commit to the Git repository's remote using
git push --tags origin smartmeter-datacollector-demo
- Now you need to wait for the GitHub Action workflow of smartmeter-datacollector-pi-gen to finish to get the updated Raspberry Pi image as a build artifact.
- Once its ready download the artifact (as a
.zip
) and extract it to get the actual.zip
archive containing the Raspberry Pi image (.img
). - Rename this
.zip
File tosmartmeter-datacollector-demo_<VERSION>_rpi_image-lite.zip
. - Manually edit the previously created release in the
smartmeter-datacollector
repository and attach the extracted.zip
archive containing the Raspberry Pi image (.img
) to the release.
-
smartmeter-datacollector-pi-gen
: v0.6.0
Smart Meter Data Collector