1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 00:07:14 +03:00

docs: RELEASING.md: Various changes after confirming releasing works.

* Outline the `release-XYZ` > `releases` workflow.
 * Expanded on exact git CLI commands to use in some stages.
This commit is contained in:
Athanasius 2020-06-17 18:04:25 +01:00
parent 141609e7fb
commit a5edde146e

View File

@ -118,21 +118,31 @@ Distribution
---
It is recommended to keep all the files for distribution on github, including the 'update_feed' file. So once you have tested the new .msi file
1. You should have already decided on the new version number, as it's specified in `config.py`. You'll need to redo the `.msi` build if you forgot. **Remember to do a fresh git commit for this change.**
1. Keep in mind that despite being specified as, e.g. '3.5.0.0' the `setup.py` code only takes note of the first 3 parts for deciding the release number. i.e. `3.5.0.1` results in the same `rel-350/EDMarketConnector_win_350.msi` as '3.5.0.0' does.
1. So as to make backing out any mistakes easier create a new branch for this release, e.g. `release-350`. 'release' is in full so as not to clash with the tag `rel-350` which could cause confusion. Ensure all the relevant commits, and no more than them, are present in this branch. This branch will be local to only you, you shouldn't ever push it to GitHub unless asked to by another maintainer.
1. Prepare a changelog text for the release. You'll need this both for the github release and the contents of the `edmarketconnector.xml` file.
1. Update `edmarketconnector.xml` to add this changelog text to the correct section.
1. You should have already decided on the new version number, as it's specified in `config.py`. You'll need to redo the `.msi` build if you forgot. **Remember to do a fresh git commit for this change.**
1. Keep in mind that despite being specified as, e.g. '3.5.0.0' the `setup.py` code only takes note of the first 3 parts for deciding the release number. i.e. `3.5.0.1` results in the same `rel-350/EDMarketConnector_win_350.msi` as '3.5.0.0' does. Also the installer won't think that '3.5.0.1' is any newer than '3.5.0.0'.
1. Prepare a changelog text for the release. You'll need this both for the GitHub release and the contents of the `edmarketconnector.xml` file.
1. Update `edmarketconnector.xml` to add this changelog text to the correct section(s).
1. You'll need to change the `<title>` and `<description>` texts to reflect the latest version and the additional changelog.
1. Update the `url`, `sparkle:version` and `length` elements of the `<enclosure>` section as per the latest appcast_win_<version>.xml file generated by the build process.
1. Update the `url`, `sparkle:version` and `length` elements of the `<enclosure>` section as per the latest `appcast_win_<version>.xml` file generated by the build process.
1. **DO NOT git commit this change or push to github**. *We need to get the github release in place first before changing the file that running EDMC clients will check.*
1. Add a git tag for the release, which you'll refer to when actually creating the release:
1. Add a git tag matching the `rel-XYZ` part of the URL in the `appcast_win_XYX.msi` file. e.g. `git tag -a rel-350`
1. Ensure this tag is pushed to github: `git push --tags <github remote>`
1. The tag should match the `rel-XYZ` part of the URL in the `appcast_win_XYX.msi` file. e.g. `git tag -a rel-350`
1. Craft a new github Release, using the tag you added before. Include the .msi file for Windows (the Source Code files are added by github based on the release tag). Use the changelog text you already prepared.
1. Now merge this release-specific branch into the `releases` branch and push it to GitHub.
1. `git checkout releases`
1. `git merge release-350`
1. As you push the changes ensure the new tag is also pushed: `git push --tags origin` (perform the suggested `git push --set-upstream origin releases` if prompted to).
1. Craft a new github Release, using the new tag so as to reference the correct commit. Include the .msi file for Windows (the Source Code files are added by github based on the release tag). Use the changelog text you already prepared.
1. Check that the URL for the release that you specified in `edmarketconnector.xml` actually matches where github has placed the `.msi` file.
1. **NOW commit the latest `edmarketconnector.xml` changes and push to github.** This is the step that fully publishes the release for running EDMC instances to pick up on 'Check for Updates'. Yes, this means that this step isn't included in the git tag, but the alternative (with hosting the file via github raw URL) is to have a race condition where a running EDMC instance might check the file and see there's a new version *before that new version is actually available for download*.
1. **NOW commit the latest `edmarketconnector.xml` changes to the `releases` branch and push to github.**
This is the step that fully publishes the release for running EDMC instances to pick up on 'Check for Updates'. Yes, this means that this step isn't included in the git tag for the release, but the alternative (with hosting the file via github raw URL) is to have a race condition where a running EDMC instance might check the file and see there's a new version *before that new version is actually available for download*.
1. `git checkout releases`
1. `git commit -m "Make release 350 live" edmarketconnector.xml`
1. `git push origin`