Compare commits
2 Commits
7eca867e0a
...
1751438ff0
| Author | SHA1 | Date | |
|---|---|---|---|
|
1751438ff0
|
|||
|
6c369264ea
|
@@ -0,0 +1,22 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
archlinux:
|
||||
name: Arch Linux
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
options: --privileged
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Build Arch Linux package
|
||||
uses: FFY00/build-arch-package@v1
|
||||
with:
|
||||
PKGBUILD: ./PKGBUILD
|
||||
@@ -0,0 +1,34 @@
|
||||
# Maintainer: Tim Huizinga <tim@huizinga.dev>
|
||||
pkgname=crete
|
||||
pkgver=dummy
|
||||
pkgrel=1
|
||||
pkgdesc='A tool that takes node and cluster configs and uses it to generate talos configs and render jinja templates'
|
||||
url='https://git.huizinga.dev/infra/crete'
|
||||
license=('GPL-3.0-or-later')
|
||||
makedepends=('cargo-nightly')
|
||||
depends=()
|
||||
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
|
||||
source=('LICENSE')
|
||||
sha256sums=('4bffc7da729013886ae68623c0d6145201b20a495879b589990953b2a27e1fbd')
|
||||
|
||||
pkgver() {
|
||||
cargo info $pkgname | grep -Po '^version: \K[\d\.]+'
|
||||
}
|
||||
|
||||
prepare() {
|
||||
export RUSTUP_TOOLCHAIN=nightly
|
||||
cargo fetch --locked --target host-tuple
|
||||
}
|
||||
|
||||
build() {
|
||||
export RUSTUP_TOOLCHAIN=nightly
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --frozen --release --all-features
|
||||
cargo run --bin $pkgname -- shell-completions > _$pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" "LICENSE"
|
||||
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
|
||||
install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions" "_$pkgname"
|
||||
}
|
||||
@@ -5,6 +5,32 @@ and render jinja templates.
|
||||
|
||||
## Installation
|
||||
|
||||
### Arch
|
||||
|
||||
First import the verification key:
|
||||
|
||||
```bash
|
||||
wget https://git.huizinga.dev/api/packages/infra/arch/repository.key -O /tmp/repository.key
|
||||
sudo pacman-key --add /tmp/repository.key
|
||||
sudo pacman-key --lsign-key $(gpg --show-keys /tmp/repository.key | sed -n 2p)
|
||||
```
|
||||
|
||||
And add the following to `/etc/pacman.conf`:
|
||||
|
||||
```ini
|
||||
[infra]
|
||||
SigLevel = Required
|
||||
Server = https://git.huizinga.dev/api/packages/infra/arch/core/$arch
|
||||
```
|
||||
|
||||
You can then install `crete` by running:
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy crete
|
||||
```
|
||||
|
||||
### Cargo install
|
||||
|
||||
Add the following to `~/.cargo.config.toml`:
|
||||
|
||||
```toml
|
||||
|
||||
Reference in New Issue
Block a user