summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Bebbington2017-11-04 02:10:47 +0000
committerTom Bebbington2017-11-04 02:10:47 +0000
commitb7c5644ab0f8e49f1349dec332ee7ab23ea4aafc (patch)
tree2c913aa30dc32c6890c487269ae8e6f6dd2820c1
parent64710056df09c6f706c1821fc47f4382b8f9dcdd (diff)
downloadaur-b7c5644ab0f8e49f1349dec332ee7ab23ea4aafc.tar.gz
Update version, add auto version retriveral script
-rw-r--r--PKGBUILD13
-rw-r--r--print-version.py13
2 files changed, 22 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 90016955382..3273a356859 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,10 +4,10 @@ _pkgbase='citra'
pkgbase="$_pkgbase-nightly-bin"
pkgname=("$_pkgbase-nightly-bin" "$_pkgbase-qt-nightly-bin")
pkgrel=2
-pkgver="70_20170218_e594e63"
+pkgver="385_20171031_ed17c54"
pkgdesc="An experimental open-source Nintendo 3DS emulator/debugger"
provides=('citra' 'citra-qt')
-builddepends=('curl')
+builddepends=('curl' 'python')
license=('GPL')
arch=('x86_64')
url="https://github.com/citra-emu/citra-nightly/"
@@ -16,9 +16,15 @@ source=(
"https://github.com/citra-emu/citra-nightly/releases/download/nightly-$(echo $pkgver | cut -d'_' -f1)/citra-linux-$id.tar.xz"
"https://raw.githubusercontent.com/citra-emu/citra/master/dist/citra.desktop"
"https://raw.githubusercontent.com/citra-emu/citra/master/dist/citra.svg"
+ "print-version.py"
)
-sha256sums=('SKIP' 'SKIP' 'SKIP')
+sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')
+pkgver() {
+ cd $srcdir
+ curl "https://api.github.com/repos/citra-emu/citra-nightly/releases" -o releases.json
+ python3 print-version.py
+}
package_citra-nightly-bin() {
depends=('sdl2' 'libpng' 'libpng12')
@@ -31,7 +37,6 @@ package_citra-qt-nightly-bin() {
optdepends=('libxkbcommon-x11: for X11 support'
'qt5-wayland: for Wayland support')
-
cd $srcdir/citra-linux-$id
mkdir -p $pkgdir/usr/bin
mv citra-qt $pkgdir/usr/bin
diff --git a/print-version.py b/print-version.py
new file mode 100644
index 00000000000..6d1bcb01c5c
--- /dev/null
+++ b/print-version.py
@@ -0,0 +1,13 @@
+import json
+from pprint import pprint
+
+with open('releases.json') as data_file:
+ data = json.load(data_file)
+
+latest = data[0]
+build_number = latest['tag_name'].split('-')[1]
+build_name_parts = latest['assets'][0]['name'].split('-')
+build_date = build_name_parts[2]
+build_id = build_name_parts[3].split(".")[0]
+
+print('_'.join([build_number, build_date, build_id])) \ No newline at end of file