convert.sh: use remote bisdn-linux HEAD on conversion from kas to repo#156
convert.sh: use remote bisdn-linux HEAD on conversion from kas to repo#156
Conversation
The changelog script currently relies on the generated default.xml's revisions being present in the upstream repository, but the very first commit on creating a release branch is to update the FEEDURI_PREFIX to the release one. If we then try to generate a default.xml using the HEAD revision, the bisdn-linux commit hash is a local one. This then breaks the script when it tries to generate a changelog and tries to checkout the new version, where bisdn-linux references a commit not existing yet in the upstream repo. Fix this by instead using the HEAD revision of the remote's current branch, or main if there isn't one. Fixes: 92fa3f6 ("scripts: add a proof of concept conversion script") Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
|
To test this try to create a release based on a kas lock file: Without the fix, it will fail once it tries to checkout the release branch via repo. Then, switch back to main, delete the branch that was generated: And then apply the changes manually. The script will ensure that the HEAD is a upstream commit so any commits on top will go away, but it does not check for local modifications. With the fix, it should succeed generating the release branch. |
|
If you only want to check the modifications, but not do an integration test: Failing: If you now look at the updated default.xml, its bisdn-linux will now reference a commit hash that does not exist in this repo upstream, but the cherry-picked commit. You an check this via e.g. Now do the same basing the release branch on the PR's branch, and the default.xml's bisdn-linux should not reference main's HEAD from the remote. If you check the branches containing this commit, it should now also list main and the PR branch (if you have the latter checked out). |
The changelog script currently relies on the generated default.xml's revisions being present in the upstream repository, but the very first commit on creating a release branch is to update the FEEDURI_PREFIX to the release one.
If we then try to generate a default.xml using the HEAD revision, the bisdn-linux commit hash is a local one.
This then breaks the script when it tries to generate a changelog and tries to checkout the new version, where bisdn-linux references a commit not existing yet in the upstream repo.
Fix this by instead using the HEAD revision of the remote's current branch, or main if there isn't one.
Fixes: 92fa3f6 ("scripts: add a proof of concept conversion script")