Skip to content

Creating a Release

Mario C edited this page May 20, 2023 · 3 revisions

To create a new release of smartmeter-datacollector and / or smartmeter-datacollector-configurator a few manual steps have to be performed.

Release commit and tag

  1. Make sure you are on the master branch in the Git repository
  2. Make sure that the software works and is ready for a new release
    1. Make sure all unit tests pass using pipenv run test
    2. 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 for smartmeter-datacollector)
      • pipenv run build
      • pipenv run build_check
      • pipenv run build_srcdeb
      • pipenv run build_deb
  3. Bump the version in smartmeter-datacollector|smartmeter-datacollector-configurator/__version__.py and stage the changes with git. Make sure to follow Semantic Versioning.
  4. Update the debian/ directory
    1. Run pipenv run debianize
    2. Manually update debian/changelog with an additional changelog entry (don't remove the older entries). See also debian/changelog for more details.
    3. Make sure the other files in the debian/ directory are up-to-date and in the proper syntax.
    4. Stage all necessary changes to the files in the debian/ directory with git.
  5. Commit the staged changes using: git commit -m "release vX.Y.Z"
  6. Create a new tag in the git repository using git tag vX.Y.Z
  7. Push the release commit and the new tag to the Git repository's remote using git push --tags origin master

Example

  • smartmeter-datacollector: v0.6.0
  • smartmeter-datacollector-configurator v0.4.0

Release on GitHub

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)

Demo (Raspberry Pi image)

To also provide a new Raspberry Pi image for the smartmeter-datacollector demo follow these instructions:

  1. Make sure you are on the smartmeter-datacollector-demo branch of the smartmeter-datacollector-pi-gen Git repository.
  2. Update the version of python3-smartmeter-datacollector_*_armhf.deb and / or python3-smartmeter-datacollector-configurator_*_armhf.deb in stage2/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).
  3. Stage the changes to stage2/99-install-smartmeter-demo/00-run.sh with git and commit them using git commit -m "bump <smartmeter-datacollector|smartmeter-datacollector-configurator> to vX.Y.Z"
  4. Push the release commit to the Git repository's remote using git push --tags origin smartmeter-datacollector-demo
  5. 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.
  6. Once its ready download the artifact (as a .zip) and extract it to get the actual .zip archive containing the Raspberry Pi image (.img).
  7. Rename this .zip File to smartmeter-datacollector-demo_<VERSION>_rpi_image-lite.zip.
  8. 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.

Example

  • smartmeter-datacollector-pi-gen: v0.6.0