Skip to content

Commit f3511e1

Browse files
Michel Lachaineclaude
andcommitted
Fix Arch build: sanitize pkgver by replacing hyphens with underscores
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 63331d6 commit f3511e1

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,16 @@ jobs:
9595
- name: Prepare source tarball
9696
run: |
9797
VERSION=${GITHUB_REF_NAME#v}
98-
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD
99-
tar -czf "/tmp/flatcam-${VERSION}.tar.gz" \
100-
--transform="s,^\.,FlatCAM-${VERSION}," \
98+
# pkgver cannot contain hyphens — replace with underscores
99+
PKGVER=${VERSION//-/_}
100+
sed -i "s/^pkgver=.*/pkgver=${PKGVER}/" PKGBUILD
101+
# Source tarball must match the name PKGBUILD expects
102+
sed -i "s|^\(source=\).*|source=(\"flatcam-${PKGVER}.tar.gz\")|" PKGBUILD
103+
tar -czf "/tmp/flatcam-${PKGVER}.tar.gz" \
104+
--transform="s,^\.,FlatCAM-${PKGVER}," \
101105
--exclude='.git' .
102-
mv "/tmp/flatcam-${VERSION}.tar.gz" .
103-
chown builder:builder PKGBUILD "flatcam-${VERSION}.tar.gz"
106+
mv "/tmp/flatcam-${PKGVER}.tar.gz" .
107+
chown builder:builder PKGBUILD "flatcam-${PKGVER}.tar.gz"
104108
105109
- name: Build package
106110
run: su builder -c "makepkg -sd --noconfirm --skipinteg"

0 commit comments

Comments
 (0)