diff options
author | Adrien 'Larandar' DUDOUIT-EXPOSITO | 2024-05-06 18:31:21 +0200 |
---|---|---|
committer | Adrien 'Larandar' DUDOUIT-EXPOSITO | 2024-05-06 18:31:21 +0200 |
commit | e52caa15f672be077946597dde13e3251518daea (patch) | |
tree | 35b1329c9b3ef8fa0d88ff911517cf1d481f5ba4 | |
parent | af600460a0e708aa0431847ca685dd811aea1059 (diff) | |
download | aur-endless-sky-git.tar.gz |
feat(version): use credit.txt to get next version
The use of `git describe` was getting the last release
plus current hash, which is not accurate.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 18 |
2 files changed, 15 insertions, 5 deletions
@@ -1,6 +1,6 @@ pkgbase = endless-sky-git pkgdesc = A sandbox-style space exploration and combat game - pkgver = 0.10.4.r16.gdba02efe3 + pkgver = 0.10.7.alpha.a5d616acc0 pkgrel = 1 url = https://endless-sky.github.io/ arch = i686 @@ -4,15 +4,17 @@ pkgname='endless-sky-git' _gitname='endless-sky' -pkgver=0.10.6.r116.ga5d616acc0 +pkgver=0.10.7.alpha.a5d616acc0 pkgrel=1 arch=('i686' 'x86_64') url="https://endless-sky.github.io/" provides=('endless-sky') depends=('openal' 'hicolor-icon-theme' 'libjpeg-turbo' 'libmad' 'glew' 'libpng' 'sdl2') makedepends=('git' 'scons') -optdepends=('endless-sky-high-dpi: high resolution graphics assets' - 'endless-sky-editor: map editor') +optdepends=( + 'endless-sky-high-dpi: high resolution graphics assets' + 'endless-sky-editor: map editor' +) conflicts=('endless-sky') license=('GPL3' 'CCPL' 'custom:public domain') pkgdesc="A sandbox-style space exploration and combat game" @@ -21,7 +23,15 @@ sha256sums=('SKIP') pkgver() { cd "$_gitname" - git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' + # The next version is present in the .cpp and the credits.txt file + # `git describe` provide the last release. + _version=$(cat credits.txt | sed 2!d | + sed -r 's/^version (.*)$/\1/' | + sed -r 's/-/./') + + # Hash is not included in the credits, might prevent continuous update + _hash=$(git rev-parse --short HEAD) + echo "${_version}.${_hash}" } build() { |