Skip to content
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

Fix publishing pre-release versions to AUR #3768

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

relu
Copy link
Member

@relu relu commented Apr 6, 2023

Fixes #3767

@relu relu requested a review from hiddeco April 6, 2023 21:01
@relu relu force-pushed the fix-aur-publish-pre branch 3 times, most recently from fbe96cb to e533113 Compare April 6, 2023 21:46
@@ -28,20 +28,21 @@ git clone aur@aur.archlinux.org:$PKGNAME $GITDIR 2>&1
CURRENT_PKGVER=$(cat $GITDIR/.SRCINFO | grep pkgver | awk '{ print $3 }')
CURRENT_PKGREL=$(cat $GITDIR/.SRCINFO | grep pkgrel | awk '{ print $3 }')

export PKGVER=${VERSION/-/}
# Transform pre-release to AUR compatible version format
export PKGVER=${VERSION/-rc./rc}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So AUR wants v2.0.0rc1?

Copy link
Member Author

@relu relu Apr 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I've seen in some examples out there (e.g. 1.2.3alpha1). Other options that would work: are 2.0.0rc.1, 2.0.0.rc1, or 2.0.0.rc.1. I couldn't find any official guidelines, the only thing we know for certain is that - is reserved as a separator between the version and the package release number.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm that’s strange, none of those are valid semver, according to spec

A pre-release version MAY be denoted by appending a hyphen

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go with 2.0.0rc.1 which preserves the current replacement ${VERSION/-/}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but I don't think Arch intended to fully support or enforce semver in any way. Here's the section about package versioning from the guidelines: https://wiki.archlinux.org/title/Arch_package_guidelines#Package_versioning

@relu relu force-pushed the fix-aur-publish-pre branch 2 times, most recently from f7222a8 to 2a9704c Compare April 7, 2023 11:14
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks @relu

Fixes fluxcd#3767

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
@relu relu merged commit 3d1173a into fluxcd:main Apr 12, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-release versions are incorrectly published in AUR
3 participants