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

Update RELEASING.md for using full version numbers.

I've also re-done the release actions/order to actually push the
release-A.B.C.D branch up to github, along with the rel-A.B.C.D tag on
its HEAD.  This way the final release step is a merge of release-A.B.C.D
into releases, which could even be done directly on github.
This commit is contained in:
Athanasius 2020-06-28 16:17:14 +01:00
parent e4eb86d3b5
commit c2dc5a62f1

View File

@ -90,7 +90,7 @@ Output will be something like (`...` denoting parts elided for brevity):
Done
You should now have one new/updated folder `dist.win32` and two new files (version number dependent): `EDMarketConnector_win_350.msi` and `appcast_win_350.xml`. If you want to just check the generated .exe files then they're in that `dist.win32` folder.
You should now have one new/updated folder `dist.win32` and two new files (version number dependent): `EDMarketConnector_win_3.5.0.0.msi` and `appcast_win_3.5.0.0.xml`. If you want to just check the generated .exe files then they're in that `dist.win32` folder.
Now check that the `EDMarketConnector.exe` in the `dist.win32` folder does run without errors.
@ -100,31 +100,39 @@ 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. 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.
**Version numbers should always be referred to in full, e.g. A.B.C.D not the old A.BC scheme.**
We'll use an old version number, 3.5.0.0, as an example throughout the following.
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. So as to make backing out any mistakes easier create a new branch for this release, e.g. `release-3.5.0.0`. 'release' is in full so as not to clash with the tag `rel-3.5.0.0` which could cause confusion. Ensure all the relevant commits, and no more than them, are present in this branch.
1. `git checkout releases`
1. `git pull origin` # Ensures local `releases` branch is up to date.
1. `git checkout -b release-3.5.0.0`
Now get all the relevant code changes into this branch. This might mean merging from another branch, such as an issue-specific one, or possibly cherry-picking commits. See [Contributing Guidelines](docs/Contributing.md) for how such branches should be named.
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. The primary location of the changelog is [Changelog.md](Changelog.md) - update this first.
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. **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. As you're working in a version-specific branch, `release-3.5.0.0`, you can safely commit these changes to git. **Do not merge the branch with `releases` until the github release is in place.**
1. Add a git tag for the release, which you'll refer to when actually creating the release:
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. This should be named `rel-A.B.C.D`, e.g. `rel-3.5.0.0.` as per the version number.
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. Now push this release-specific branch to GitHub.
1. Check which of your remotes is for github with `git remotes -v`. It should really be `origin` and the following assumes that.
1. `git push --set-upstream --tags origin release-A.B.C.D`
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. Craft a [new github Release](https://github.com/EDCD/EDMarketConnector/releases/new), 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 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. **Now merge the new release branch into `releases`.**
The final step below is what fully publishes the release for running EDMC instances to pick up on 'Check for Updates'. The WinSparkle check for updates specifically targets `https://raw.githubusercontent.com/EDCD/EDMarketConnector/releases/edmarketconnector.xml` as per `config.py `update_feed`.
1. `git checkout releases`
1. `git commit -m "Make release 350 live" edmarketconnector.xml`
1. `git merge release-3.5.0.0`
1. `git push origin`