Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
pkgbase = create-vlang-app
pkgdesc = V-native scaffolding CLI for the V programming language
pkgver = 0.0.1
pkgver = 0.1.0
pkgrel = 1
url = https://github.com/Create-Vlang-App/create-vlang-app
arch = x86_64
arch = aarch64
license = MIT
depends = git
makedepends = vlang
source = create-vlang-app-0.0.1.tar.gz::https://github.com/Create-Vlang-App/create-vlang-app/archive/e5c07f5.tar.gz
sha256sums = 2db15ba3f4992eb5dcf1dffbd5a26826e433a77523fb102c6e47d7c3d965d1de
source = create-vlang-app-0.1.0.tar.gz::https://github.com/Create-Vlang-App/create-vlang-app/archive/refs/tags/create-vlang-app@0.1.0.tar.gz
sha256sums = f7c1f62f8eab3bcd4e55b05700924c864f182247ff7c050c39884f5013592729

pkgname = create-vlang-app
66 changes: 45 additions & 21 deletions .github/workflows/validate-pkgbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,61 @@ on:
permissions:
contents: read

# Never install V from the AUR `vlang` package (stale). Match create-vlang-app CI:
# vlang/setup-v on ubuntu, then run makepkg inside an Arch container with that toolchain.
jobs:
validate:
name: makepkg + .SRCINFO sync
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Install build dependencies
run: |
pacman -Sy --noconfirm --needed base-devel vlang git sudo

- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- id: setup-v
uses: vlang/setup-v@12a9fab625c7fd9e51972eef71c84c3d4f41c45c
with:
version-file: .v-version
cache: true

- name: Verify .SRCINFO matches PKGBUILD
run: |
set -euo pipefail
makepkg --printsrcinfo > .SRCINFO.generated
diff -u .SRCINFO .SRCINFO.generated
docker run --rm \
-v "$PWD:/work:rw" \
-w /work \
archlinux:latest \
bash -euo pipefail -c '
pacman -Sy --noconfirm --needed pacman-contrib base-devel
useradd -m builder
chown -R builder:builder /work
runuser -u builder -- makepkg --printsrcinfo > /tmp/.SRCINFO.generated
diff -u .SRCINFO /tmp/.SRCINFO.generated
'

- name: Build package (non-root)
- name: Build package and smoke CLI (non-root)
env:
V_BIN_PATH: ${{ steps.setup-v.outputs.bin-path }}
run: |
set -euo pipefail
useradd -m -G wheel builder
echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
chown -R builder:builder .
su builder -c 'makepkg -s --noconfirm --skippgpcheck'

- name: Smoke installed CLI
run: |
su builder -c '
set -euo pipefail
create-vlang-app --version | grep -qE "0\\.0\\.1"
create-vlang-app --help | grep -q list-templates
'
test -n "$V_BIN_PATH"
test -x "$V_BIN_PATH/v"
docker run --rm \
-v "$PWD:/work:rw" \
-v "$V_BIN_PATH:$V_BIN_PATH:ro" \
-e "PATH=${V_BIN_PATH}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
-w /work \
archlinux:latest \
bash -euo pipefail -c '
pacman -Sy --noconfirm --needed base-devel git sudo
useradd -m -G wheel builder
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown -R builder:builder /work
# -d: do not pull AUR/pacman makedepends; V comes from setup-v
runuser -u builder -- env "PATH=$PATH" bash -euo pipefail -c "
makepkg -d --noconfirm --skippgpcheck
pkg=\$(ls create-vlang-app-*.pkg.tar.* | grep -v -- '-debug-' | head -1)
test -n \"\$pkg\"
sudo pacman -U --noconfirm \"\$pkg\"
create-vlang-app --version | grep -qE \"[0-9]+\\.[0-9]+\\.[0-9]+\"
create-vlang-app --help | grep -q list-templates
"
'
1 change: 1 addition & 0 deletions .v-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.5.2
3 changes: 2 additions & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ arch=('x86_64' 'aarch64')
url="https://github.com/Create-Vlang-App/create-vlang-app"
license=('MIT')
depends=('git')
makedepends=('vlang')
# Build requires the V compiler from https://github.com/vlang/v (official bootstrap /
# vlang/setup-v). Do NOT use the AUR `vlang` package — it is outdated and unused in CI.
# GitHub tag archive for create-vlang-app@0.1.0
_tag="create-vlang-app@${pkgver}"
_srcdir="create-vlang-app-create-vlang-app-${pkgver}"
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ paru -S create-vlang-app

## Manual build

Requires the **official V toolchain** (not the AUR `vlang` package — it is outdated).
Same pin as CI: [`.v-version`](.v-version) via [`vlang/setup-v`](https://github.com/vlang/setup-v) or https://github.com/vlang/v.

```bash
# Example: bootstrap V 0.5.2, then build the package
git clone --depth 1 --branch 0.5.2 https://github.com/vlang/v ~/v && make -C ~/v
export PATH="$HOME/v:$PATH"

git clone https://github.com/Create-Vlang-App/aur-package.git
cd aur-package
makepkg -si
makepkg -d -si # -d: skip pacman deps; V is already on PATH
```

## Other channels
Expand Down