diff options
author | William Gathoye | 2017-08-14 01:37:52 +0200 |
---|---|---|
committer | William Gathoye | 2017-08-14 01:37:52 +0200 |
commit | e4972e168d6706ef4e25bbb21e7170e40e67ab0d (patch) | |
tree | df55c9ff58b11343035d8cb52afdbc3e84e955f6 /PKGBUILD | |
parent | c49d7dc73fa1183620db30f639a0da524caa8c9b (diff) | |
download | aur-e4972e168d6706ef4e25bbb21e7170e40e67ab0d.tar.gz |
The commit id was always the same, fix this.
We previously used a way to recover the last tag from all branches.
However proceeding this way could leads in unattended behaviors.
First, imagine we are in the release 4.0, and a bug fix appears for 3.6
afterwardsi. The latest tag is not 4.0.x but 3.6.x and the package is not
updated.
Second, the manner we were taking the tag was taking its fixed commit with
it, not the latest commit available after the tag.
Now, we are just using a more common manner to recover the commit id: we
are prefixing it with the latest tag reachable from the **current** branch.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -2,7 +2,7 @@ pkgname=mattermost-git _pkgname="${pkgname%-git}" -pkgver=4.0.0.rc2.r0.ge5912d4f9 +pkgver=4.0.0.rc2.r214.ga6ba5a5e7 pkgrel=1 pkgdesc="Open source Slack-alternative in Golang and React" arch=('i686' 'x86_64') @@ -30,7 +30,7 @@ source=( # For local tests, simply replace this git URL by # For the URL syntax, please check this link: # https://wiki.archlinux.org/index.php/VCS_package_guidelines#VCS_sources - # platform::git+file:///home/whatever/repo + #'platform::git+file:///home/user/whatever/mattermost-platform#branch=release-4.1' 'git+https://github.com/mattermost/platform' 'mattermost.service' 'mattermost.sh' @@ -43,22 +43,14 @@ sha512sums=( 'e3ffcf4b86e2ecc7166c1abf92cd4de23d81bad405db0121e513a8d81fea05eec9dd508141b14b208c4c13fbc347c56f01ed91326faa01e872ecdedcc18718f9' 'b95bf2c0d840d0e85baebc1051c872056fa4990d263334fecc7b11d96085cb65a69dd866f18889e209336028f17c02152c13a92d2be1c21848939f22203439f0') -# Take the latest tag available even if that tag is not reachable from the -# branch we are currently in. Indeed, tags are only made available in master as -# soon the branch containing this tag is removed. The code from the latest -# branch is anyway always made available in master. For this use case, this is -# actually better to take the lastest version available instead of the latest -# from master. -# src.: https://github.com/jquery/jquery/issues/1854#issuecomment-62739082 -# Not documented in: -# https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git +# Using the most recent un-annotated tag reachable from the last commit +# src.: https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git # Remove the v prefix: # src.: http://stackoverflow.com/a/7979255/3514658 pkgver() { cd "$srcdir"/src/github.com/mattermost/platform - git describe --long \ - $(git for-each-ref --format="%(refname)" --sort=-authordate --count=1 refs/tags) \ - | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' + git describe --long --tags | \ + sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { |