Adding the automatic versioning to the script

This commit is contained in:
ARS101
2024-05-31 14:09:36 +03:30
parent 1a14f54994
commit 9100ee8a64

View File

@@ -1,19 +1,26 @@
#!/bin/bash
set -x
pkgname="namban"
pkgver="0.3-1"
arch="amd64"
maintainer="meshya, D3F4U1T"
pkgdesc="A simple gui tool for set dns settings."
pkgdir="$(pwd)"/"$pkgname"_"$pkgver"_"$arch"
srcdir="$(pwd)/namban"
srcdir="$(pwd)/$pkgname"
# TODO: Add the dependencies
# TODO: Create a CI/CD workflow to auto build the package
pkgver_func() {
cd "$srcdir"
git describe --no-abbrev --tags | sed 's/v//g'
cd ..
}
prepare() {
git clone -b "v$pkgver" --depth=1 "https://github.com/parchlinuxB/namban"
git clone "https://github.com/parchlinuxB/namban"
pkgver="$(pkgver_func)"
pkgdir="$(pwd)"/"$pkgname"_"v$pkgver"_"$arch"
}
package() {