Many projects add a leading `v` to tags for versions. However, the
contents of tarballs don't include this, so `$builddir` ends up being
`package-v1.0.0`, but the real path is actually `package-1.0.0`.
I haven't seem any scenarios where a leading `v` is present but this
doesn't uphold.
That aside, APKBUILD conventions seem to align with removing the leading
`v`.
---
createaport/forge.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/createaport/forge.py b/createaport/forge.py
index 4733ded..2d5bef2 100644
--- a/createaport/forge.py+++ b/createaport/forge.py
@@ -27,6 +27,10 @@ def get_forge_info(aport):
aport = get_forge_info_gitlab(aport)
elif 'chromium/issues/detail?id=332189 -->' in raw:
aport = get_forge_info_sourcehut(aport)
++ if aport.pkgver.startswith("v"):+ aport.pkgver = aport.pkgver[1:]+ return aport
--
2.39.2
Thanks, applied :)
On 2/22/23 11:15, Hugo Osvaldo Barrera wrote:
> Many projects add a leading `v` to tags for versions. However, the> contents of tarballs don't include this, so `$builddir` ends up being> `package-v1.0.0`, but the real path is actually `package-1.0.0`.>> I haven't seem any scenarios where a leading `v` is present but this> doesn't uphold.>> That aside, APKBUILD conventions seem to align with removing the leading> `v`.> ---> createaport/forge.py | 4 ++++> 1 file changed, 4 insertions(+)>> diff --git a/createaport/forge.py b/createaport/forge.py> index 4733ded..2d5bef2 100644> --- a/createaport/forge.py> +++ b/createaport/forge.py> @@ -27,6 +27,10 @@ def get_forge_info(aport):> aport = get_forge_info_gitlab(aport)> elif 'chromium/issues/detail?id=332189 -->' in raw:> aport = get_forge_info_sourcehut(aport)> +> + if aport.pkgver.startswith("v"):> + aport.pkgver = aport.pkgver[1:]> +> return aport> >