summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSemyon Maryasin2019-03-09 14:42:04 +0300
committerSemyon Maryasin2019-03-09 14:42:04 +0300
commitd7cfcf710302c83437d00c6a8c69c78adae408b8 (patch)
treeac416814209f5071d07f26d256fe8a4095b96297
parent34cc0697ee69287603e3a46ef49782bfbb7e5b37 (diff)
downloadaur-d7cfcf710302c83437d00c6a8c69c78adae408b8.tar.gz
Always install latest version
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD18
2 files changed, 18 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e7b8387ddb6c..e169f79ca65c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = zeit-now-bin
- pkgdesc = Realtime Global Deployments by Zeit, pre-built binary
+ pkgdesc = Realtime Global Deployments by Zeit, pre-built binary (always latest version)
pkgver = 14.0.3
pkgrel = 1
url = https://zeit.co/now
@@ -10,8 +10,8 @@ pkgbase = zeit-now-bin
provides = zeit-now
conflicts = nodejs-now
options = !strip
- source = https://github.com/zeit/now-cli/releases/download/14.0.3/now-linux.gz
- md5sums = f64692f156227081bb9a9ae4c0af18bc
+ source = https://github.com/zeit/now-cli/releases/latest
+ md5sums = SKIP
pkgname = zeit-now-bin
diff --git a/PKGBUILD b/PKGBUILD
index 60c2b8038c8b..c9b256baaf14 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ pkgname=zeit-now-bin
pkgver=14.0.3
pkgrel=1
epoch=
-pkgdesc="Realtime Global Deployments by Zeit, pre-built binary"
+pkgdesc="Realtime Global Deployments by Zeit, pre-built binary (always latest version)"
arch=("x86_64")
url="https://zeit.co/now"
# license is according to https://www.npmjs.com/package/now
@@ -25,12 +25,24 @@ backup=()
options=("!strip")
install=
changelog=
-source=("https://github.com/zeit/now-cli/releases/download/${pkgver}/now-linux.gz")
+# Actually this is just an information about the latest version.
+source=("https://github.com/zeit/now-cli/releases/latest")
noextract=()
-md5sums=('f64692f156227081bb9a9ae4c0af18bc')
+md5sums=('SKIP')
validpgpkeys=()
+pkgver() {
+ # Could not find a way to check version *before* downloading sources,
+ # so we fetch version information instead of sources
+ # and then download the real binary in build()
+ cat latest | grep -o 'tag/[^"]*' | sed 's:tag/::'
+}
+
build() {
+ # now really download the source
+ curl -L https://github.com/zeit/now-cli/releases/download/${pkgver}/now-linux.gz -o now-linux.gz
+ # and unpack it
+ gunzip now-linux.gz
chmod +x now-linux
}