Skip to content

Commit

Permalink
docs(contributing): add explanation for release notes usage
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviml committed Apr 9, 2021
1 parent bebabf7 commit b07a74d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The class name convention should be `Device Model + Type + Controller`. For exam

Note that this project will only accept the mapping that the original controller would follow with its original hub, or the closest behaviour we can get.

This is a [commit](https://github.com/xaviml/controllerx/commit/38ee4b03ac31bf966523cc63c0200567f912f201) of a complete example of adding a new device, it can be used as a reference.

## Imports

Run the following to fix imports order:
Expand Down Expand Up @@ -122,7 +124,7 @@ git checkout -b <username>-<remote-branch> <username>/<remote-branch>

## Deployment

Thanks to the Azure Pipelines, we are able to deploy by just creating a new tag on git. So first, we will need to bump version with `commitizen` by running the following line in the `main` branch:
Thanks to the Azure Pipelines, we are able to deploy by just creating a new tag on git. Before proceding with new version bump, make sure to have all the changes for this release in the `RELEASE_NOTES.md` file. Finally, we will need to bump version with `commitizen` by running the following line in the `main` branch:

```shell
cz bump --no-verify
Expand All @@ -131,7 +133,7 @@ cz bump --no-verify
`--prerelease beta` tag can be added to create a pre-release. Note that you can also add `--dry-run` to see which version will bump without commiting anything. Then, we can directly push the tags:

```shell
git push origin main --tags
git push origin HEAD --tags
```

This will automatically generate a GitHub release with the changes for that release.
This will automatically generate a GitHub release with the changes for that release, and the release from the `RELEASE_NOTES.md` file.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--:warning: This major/minor change contains a breaking change.-->
_This minor change does not contain any breaking changes._
_Note: Remember to restart the AppDaemon addon/server after updating to a new version._
_PRERELEASE_NOTE_
PRERELEASE_NOTE

<!--
## :pencil2: Features
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ stages:
archiveFile: $(Build.ArtifactStagingDirectory)/controllerx.zip
- script: sed -i 's/VERSION_TAG/${{ variables['Build.SourceBranchName'] }}/g' RELEASE_NOTES.md
displayName: Replace version in RELEASE_NOTES.md
- script: "sed -i 's/PRERELEASE_NOTE/Note: Some links might not work or might be not updated due to being a pre-release, and documentation is not yet available/g' RELEASE_NOTES.md"
- script: "sed -i 's/PRERELEASE_NOTE/_Note: Some links might not work or might be not updated due to being a pre-release, and documentation is not yet available_/g' RELEASE_NOTES.md"
displayName: Replace prerelease note in RELEASE_NOTES.md
condition: contains(variables['Build.SourceBranchName'], 'b')
- script: sed -i 's/PRERELEASE_NOTE//g' RELEASE_NOTES.md
Expand Down

0 comments on commit b07a74d

Please sign in to comment.