mirror of
https://github.com/luzifer-aur/korvike.git
synced 2024-12-20 19:11:16 +00:00
korvike v0.13.0
This commit is contained in:
commit
a0a2bbcec2
4 changed files with 80 additions and 0 deletions
13
.SRCINFO
Normal file
13
.SRCINFO
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
pkgbase = korvike
|
||||||
|
pkgdesc = korvike takes a Go template and executes it
|
||||||
|
pkgver = 0.13.0
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://github.com/Luzifer/korvike
|
||||||
|
arch = i686
|
||||||
|
arch = x86_64
|
||||||
|
license = Apache
|
||||||
|
makedepends = go
|
||||||
|
source = korvike-0.13.0.tar.gz::https://github.com/Luzifer/korvike/archive/v0.13.0.tar.gz
|
||||||
|
sha512sums = dffcdf394f93e587c9784543468684825b08b66c13190e645de8c3d5b5f9e92daad88e67e7393a0b2b6e6879c648bba54b452429e010ce340aa31a2bf1e51f30
|
||||||
|
|
||||||
|
pkgname = korvike
|
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
||||||
|
!PKGBUILD
|
||||||
|
!.SRCINFO
|
||||||
|
!update_version.sh
|
25
PKGBUILD
Normal file
25
PKGBUILD
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# Maintainer: Knut Ahlers <knut at ahlers dot me>
|
||||||
|
|
||||||
|
pkgname=korvike
|
||||||
|
pkgver=0.13.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="korvike takes a Go template and executes it"
|
||||||
|
arch=('i686' 'x86_64')
|
||||||
|
url="https://github.com/Luzifer/$pkgname"
|
||||||
|
license=('Apache')
|
||||||
|
depends=()
|
||||||
|
makedepends=('go')
|
||||||
|
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
|
||||||
|
sha512sums=('dffcdf394f93e587c9784543468684825b08b66c13190e645de8c3d5b5f9e92daad88e67e7393a0b2b6e6879c648bba54b452429e010ce340aa31a2bf1e51f30')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||||
|
go build -a -v \
|
||||||
|
-ldflags="-X main.version=${pkgver}" \
|
||||||
|
-mod=readonly \
|
||||||
|
-o korvike
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 -t "${pkgdir}/usr/bin" "${srcdir}/${pkgname}-${pkgver}/korvike"
|
||||||
|
}
|
37
update_version.sh
Executable file
37
update_version.sh
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# Read pkg name
|
||||||
|
PKG=$(awk -F '=' '/pkgname=/{ print $2 }' PKGBUILD)
|
||||||
|
|
||||||
|
# Get latest version
|
||||||
|
VER=$(git ls-remote --tags --sort -v:refname https://github.com/Luzifer/korvike.git |
|
||||||
|
head -n1 |
|
||||||
|
grep -Eo 'tags/v[0-9.]+' |
|
||||||
|
grep -Eo '[0-9.]+$')
|
||||||
|
|
||||||
|
# Insert latest version into PKGBUILD
|
||||||
|
sed -i \
|
||||||
|
-e "s/^pkgver=.*/pkgver=${VER}/" \
|
||||||
|
PKGBUILD
|
||||||
|
|
||||||
|
# Check whether this changed anything
|
||||||
|
if (git diff --exit-code PKGBUILD); then
|
||||||
|
echo "Package ${PKG} has most recent version ${VER}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Reset pkgrel
|
||||||
|
sed -i \
|
||||||
|
-e 's/pkgrel=.*/pkgrel=1/' \
|
||||||
|
PKGBUILD
|
||||||
|
|
||||||
|
# Update source hashes
|
||||||
|
updpkgsums
|
||||||
|
|
||||||
|
# Update .SRCINFO
|
||||||
|
makepkg --printsrcinfo >.SRCINFO
|
||||||
|
|
||||||
|
# Commit changes
|
||||||
|
git add PKGBUILD .SRCINFO
|
||||||
|
git commit -m "${PKG} v${VER}"
|
Loading…
Reference in a new issue