summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrien 'Larandar' DUDOUIT-EXPOSITO2024-05-06 18:31:21 +0200
committerAdrien 'Larandar' DUDOUIT-EXPOSITO2024-05-06 18:31:21 +0200
commite52caa15f672be077946597dde13e3251518daea (patch)
tree35b1329c9b3ef8fa0d88ff911517cf1d481f5ba4
parentaf600460a0e708aa0431847ca685dd811aea1059 (diff)
downloadaur-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--.SRCINFO2
-rw-r--r--PKGBUILD18
2 files changed, 15 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d8523d02993f..60a45c164a89 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 539489a95254..18513035cb45 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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() {