Compare commits

...
2 Commits
Author SHA1 Message Date
warkanum 32cf25ff73 chore(release): update package version to 1.0.91
Release / test (push) Successful in 54s
Release / release (push) Successful in 2m31s
Release / AUR package (relspec) (push) Successful in 50s
Release / pkg-rpm (push) Successful in 1m50s
Release / AUR package (relspec-bin) (push) Successful in 52s
Release / pkg-deb (push) Successful in 1m32s
2026-10-12 22:15:53 +02:00
warkanum 032093e8c0 feat(packaging): add relspec-bin AUR package
- Add linux/arch/relspec-bin/PKGBUILD using prebuilt release tarballs
- Move source PKGBUILD to linux/arch/relspec/PKGBUILD
- Release: build static binaries, pack linux tarballs (binary + LICENSE)
- AUR job: matrix over relspec and relspec-bin
- Makefile: bump pkgver in both PKGBUILDs
2026-10-12 22:15:07 +02:00
6 changed files with 68 additions and 17 deletions
+37 -10
View File
@@ -71,11 +71,18 @@ jobs:
EXT=""
[ "$GOOS" = "windows" ] && EXT=".exe"
NAME="relspec-${GOOS}-${GOARCH}${EXT}"
GOOS="$GOOS" GOARCH="$GOARCH" go build \
GOOS="$GOOS" GOARCH="$GOARCH" CGO_ENABLED=0 go build \
-trimpath \
-ldflags "$LDFLAGS" \
-o "$NAME" ./cmd/relspec
echo "Built $NAME"
if [ "$GOOS" = "linux" ]; then
TARNAME="relspec_${VERSION#v}_${GOOS}_${GOARCH}.tar.gz"
cp "$NAME" relspec
tar czf "$TARNAME" relspec LICENSE
rm relspec
echo "Packed $TARNAME"
fi
done
- name: Build Windows installer
@@ -121,7 +128,7 @@ jobs:
exit 1
fi
for f in relspec-*; do
for f in relspec-* relspec_*.tar.gz; do
echo "Uploading $f..."
curl -s -X POST "${UPLOAD_URL}?name=${f}" \
-H "Authorization: token ${GITHUB_TOKEN}" \
@@ -132,8 +139,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pkg-aur:
name: AUR package (${{ matrix.pkg }})
needs: release
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pkg: [relspec, relspec-bin]
steps:
- uses: actions/checkout@v4
@@ -145,6 +157,7 @@ jobs:
VERSION="${{ github.event.inputs.tag || github.ref_name }}"
PKGVER="${VERSION#v}"
PKG="${{ matrix.pkg }}"
AUR_KEY_PATH="$HOME/.ssh/aur"
AUR_KNOWN_HOSTS="$HOME/.ssh/known_hosts"
@@ -183,10 +196,15 @@ jobs:
# Clone AUR repo
GIT_SSH_COMMAND="ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$AUR_KNOWN_HOSTS -i $AUR_KEY_PATH" \
git clone ssh://aur@aur.archlinux.org/relspec.git aur-repo
git clone "ssh://aur@aur.archlinux.org/${PKG}.git" aur-repo
CURRENT_PKGVER=$(awk -F= '/^pkgver=/ {print $2; exit}' aur-repo/PKGBUILD | tr -d "[:space:]")
CURRENT_PKGREL=$(awk -F= '/^pkgrel=/ {print $2; exit}' aur-repo/PKGBUILD | tr -d "[:space:]")
if [ -f aur-repo/PKGBUILD ]; then
CURRENT_PKGVER=$(awk -F= '/^pkgver=/ {print $2; exit}' aur-repo/PKGBUILD | tr -d "[:space:]")
CURRENT_PKGREL=$(awk -F= '/^pkgrel=/ {print $2; exit}' aur-repo/PKGBUILD | tr -d "[:space:]")
else
CURRENT_PKGVER=""
CURRENT_PKGREL=0
fi
if [ "$CURRENT_PKGVER" = "$PKGVER" ]; then
case "$CURRENT_PKGREL" in
@@ -202,16 +220,25 @@ jobs:
PKGREL=1
fi
echo "Publishing AUR package version ${PKGVER}-${PKGREL}"
echo "Publishing AUR package ${PKG} ${PKGVER}-${PKGREL}"
# Compute SHA256 of the source archive from the same URL the PKGBUILD will download.
SHA=$(curl -fsSL "https://git.warky.dev/wdevs/relspecgo/releases/download/v${PKGVER}/relspec-v${PKGVER}-source.zip" | sha256sum | cut -d' ' -f1)
# Compute SHA256 of the artifacts from the same URLs the PKGBUILD will download.
DL="https://git.warky.dev/wdevs/relspecgo/releases/download/v${PKGVER}"
if [ "$PKG" = "relspec-bin" ]; then
SHA_AMD64=$(curl -fsSL "${DL}/relspec_${PKGVER}_linux_amd64.tar.gz" | sha256sum | cut -d' ' -f1)
SHA_ARM64=$(curl -fsSL "${DL}/relspec_${PKGVER}_linux_arm64.tar.gz" | sha256sum | cut -d' ' -f1)
SUMS=(-e "s/^sha256sums_x86_64=.*/sha256sums_x86_64=('${SHA_AMD64}')/" \
-e "s/^sha256sums_aarch64=.*/sha256sums_aarch64=('${SHA_ARM64}')/")
else
SHA=$(curl -fsSL "${DL}/relspec-v${PKGVER}-source.zip" | sha256sum | cut -d' ' -f1)
SUMS=(-e "s/^sha256sums=.*/sha256sums=('${SHA}')/")
fi
# Update PKGBUILD — keep remote source URL, bump version/checksum, and increment pkgrel for same-version rebuilds.
sed -e "s/^pkgver=.*/pkgver=${PKGVER}/" \
-e "s/^pkgrel=.*/pkgrel=${PKGREL}/" \
-e "s/^sha256sums=.*/sha256sums=('${SHA}')/" \
linux/arch/PKGBUILD > aur-repo/PKGBUILD
"${SUMS[@]}" \
"linux/arch/${PKG}/PKGBUILD" > aur-repo/PKGBUILD
# Generate .SRCINFO inside an Arch container (docker cp avoids DinD volume mount issues)
CID=$(docker run -d archlinux:latest sleep infinity)
+4 -4
View File
@@ -238,9 +238,9 @@ release: lint fmt-check govulncheck test build ## Run lint, format check, govuln
PKGVER=$${version#v}; \
echo "Updating package metadata to $$PKGVER..."; \
echo "$$PKGVER" > VERSION; \
sed -i "s/^pkgver=.*/pkgver=$$PKGVER/" linux/arch/PKGBUILD; \
sed -i "s/^pkgver=.*/pkgver=$$PKGVER/" linux/arch/relspec/PKGBUILD linux/arch/relspec-bin/PKGBUILD; \
sed -i "s/^Version:.*/Version: $$PKGVER/" linux/centos/relspec.spec; \
git add VERSION linux/arch/PKGBUILD linux/centos/relspec.spec; \
git add VERSION linux/arch/relspec/PKGBUILD linux/arch/relspec-bin/PKGBUILD linux/centos/relspec.spec; \
if ! git diff --cached --quiet; then \
git commit -m "chore(release): update package version to $$PKGVER"; \
fi; \
@@ -262,9 +262,9 @@ release-version: lint fmt-check staticcheck govulncheck ## Run lint, format chec
NEXT="v$$PKGVER"; \
echo "Current: v$$CURRENT → Next: $$NEXT"; \
echo "$$PKGVER" > VERSION; \
sed -i "s/^pkgver=.*/pkgver=$$PKGVER/" linux/arch/PKGBUILD; \
sed -i "s/^pkgver=.*/pkgver=$$PKGVER/" linux/arch/relspec/PKGBUILD linux/arch/relspec-bin/PKGBUILD; \
sed -i "s/^Version:.*/Version: $$PKGVER/" linux/centos/relspec.spec; \
git add VERSION linux/arch/PKGBUILD linux/centos/relspec.spec; \
git add VERSION linux/arch/relspec/PKGBUILD linux/arch/relspec-bin/PKGBUILD linux/centos/relspec.spec; \
git commit -m "chore(release): update package version to $$PKGVER"; \
git tag -a "$$NEXT" -m "Release $$NEXT"; \
git push origin HEAD "$$NEXT"; \
+1 -1
View File
@@ -1 +1 @@
1.0.90
1.0.91
+24
View File
@@ -0,0 +1,24 @@
# Maintainer: Hein (Warky Devs) <hein@warky.dev>
pkgname=relspec-bin
pkgver=1.0.91
pkgrel=1
pkgdesc="RelSpec is a comprehensive database relations management tool that reads, transforms, and writes database table specifications across multiple formats and ORMs."
arch=('x86_64' 'aarch64')
url="https://git.warky.dev/wdevs/relspecgo"
license=('MIT')
provides=('relspec')
conflicts=('relspec')
options=('!debug')
source_x86_64=("$pkgname-$pkgver-x86_64.tar.gz::$url/releases/download/v$pkgver/relspec_${pkgver}_linux_amd64.tar.gz")
source_aarch64=("$pkgname-$pkgver-aarch64.tar.gz::$url/releases/download/v$pkgver/relspec_${pkgver}_linux_arm64.tar.gz")
sha256sums_x86_64=('SKIP')
sha256sums_aarch64=('SKIP')
package() {
# Binary
install -Dm755 "relspec" "$pkgdir/usr/bin/relspec"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Default config dir
install -dm755 "$pkgdir/etc/relspec"
}
@@ -1,6 +1,6 @@
# Maintainer: Hein (Warky Devs) <hein@warky.dev>
pkgname=relspec
pkgver=1.0.90
pkgver=1.0.91
pkgrel=1
pkgdesc="RelSpec is a comprehensive database relations management tool that reads, transforms, and writes database table specifications across multiple formats and ORMs."
arch=('x86_64' 'aarch64')
+1 -1
View File
@@ -1,5 +1,5 @@
Name: relspec
Version: 1.0.90
Version: 1.0.91
Release: 1%{?dist}
Summary: RelSpec is a comprehensive database relations management tool that reads, transforms, and writes database table specifications across multiple formats and ORMs.