-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add release "next" version command #52
Conversation
6f08efd
to
0295331
Compare
Anything against the It's for traceability, because it's not linked to any tag. Many packages can have the same version otherwise. If needed, I can add them only if we are in the |
Somehow, the new metadata info are not in the final zip when I use it on some plugins. |
- When packaging or releasing, you can use these keywords : | ||
- `latest` will make a package of the latest tag described in the changelog file. | ||
- `next` will make a package of the possible smallest higher tag : | ||
- `3.4.0` -> `3.4.1-alpha` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it 3.4.1 ?
qgispluginci/release.py
Outdated
|
||
# Date/time in UTC | ||
add_in_file( | ||
"{}/metadata.txt".format(parameters.plugin_path), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"{}/metadata.txt".format(parameters.plugin_path), | |
f"{parameters.plugin_path}/metadata.txt", |
@@ -49,6 +49,22 @@ def test_version_note_from_tag(self): | |||
self.assertIsNone(version.prerelease) | |||
self.assertFalse(version.is_prerelease) | |||
|
|||
def test_next_version(self): | |||
""" Test to guess the next version. """ | |||
self.assertEqual(parse_tag("10.1.0").next_version().version, "10.1.1-alpha") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this because next version is experimental by default?
Yes it is expected, to be the "smallest higher version", so by adding any pre-release string.
This is based on some previous experiences with the QGIS Plugin Manager and some users who you have downloaded artifact. They forgot to come back to a normal "tagged" version because the Plugin Manager in QGIS was not notifying them until we make a higher proper tag. I'm aware that it looks fragile for now. Of course I'm happy to have a better solution. It's just how QGIS Plugin manager works for now to notify new versions. I hope I was clear :) |
I'm not sure that it's a good idea to make the next version experimental by default. How to pick the type of pre-release? If I just want a beta or directly a release candidate or a post, can I do it? We're speaking about the conventional, nearly standardized, semantic versioning so I think it would be better to implement it cleanly and work on QGIS Plugins Manager to make it fit also the convention, instead of keep stucked on a irregular implementation. No? |
I don't see the related commit. Can you link to the lines of code please? Not sure that it's a shared expectation so maybe it's better to use it only with this next command. |
Hum, you mean that for zip package, we shouldn't set the "experimental" flag in the metadata.txt ?
If your last tag in the changelog is a RC and in the CLI you ask a next version with
Sorry, I don't understand. Everything is following semantic versioning here. QGIS is also following this convention.
Sure, I though about that, then I thought it doesn't bother to have this info in the metadata.txt. I can make the PR in QGIS documentation to add them : https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#plugin-metadata I can change that if needed. For the code, look |
f0c1abd
to
06174a3
Compare
What's up here? |
I want to come back on it. Some code from this PR is in the new one #119 |
f4f775b
to
c8fd893
Compare
Let's close it even if I'm still missing this feature. if [ -z "$CI_COMMIT_TAG" ]
then
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
VERSION=$(echo ${TAG} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')-alpha
echo "VERSION=${VERSION}" > build.env
echo "STATUS=unstable" >> build.env
else
echo "VERSION=${CI_COMMIT_TAG}" > build.env
echo "STATUS=stable" >> build.env
fi |
branch moved to my own fork for archive |
This would be convenient on CI, to make a package when it's not based on a "tag", but rather on a commit.
The version must always be lower in the metadata.txt otherwise QGIS Plugin Manager won't notify the user for a new version.
Fix #34