diff options
author | bartus | 2019-06-04 15:45:34 +0200 |
---|---|---|
committer | bartus | 2019-06-05 08:51:59 +0200 |
commit | 4be009da18f3036f2e02cd62ec527bc7e2e7ffe0 (patch) | |
tree | 0c5744a2389c0690c3183e4210bb27e249b7c46a /.travis.yml | |
parent | 1a7af6d2cae96350eb3565d07bde1972de74b70b (diff) | |
download | aur-4be009da18f3036f2e02cd62ec527bc7e2e7ffe0.tar.gz |
check version before rebuild
skip rebuild if upstream version equals one already in AUR-repo
force rebuild every '$i' days
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index 7285d693f5a9..e3e0d98bf0ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,13 @@ arch: # override `package-cleanup.hook` to preserve cache for travis. - "sudo mkdir /etc/pacman.d/hooks/ && sudo ln -s /dev/null /etc/pacman.d/hooks/package-cleanup.hook" - "sudo pacman -S --noconfirm ccache moreutils" +# check for new version +# @update_interval in days + - "update_interval=5" + - "makepkg -od --skipinteg" + - "new_pkgver=$(. PKGBUILD; [[ -v epoch ]] && echo -n $epoch:; echo $pkgver-$pkgrel)" + - "old_pkgver=$(. PKGBUILD; pacman -S --print-format %v $pkgname|tail -n1)" + - '[[ "$new_pkgver" == "$old_pkgver" && $((`date +%j`%update_interval)) != 0 ]] && { echo "Current version is up to date!"; exit 0; }' # exit with makepkg return code - "set -o pipefail" - "makepkg -s --noconfirm TRAVIS=1 MAKEFLAGS='-j2' 2>&1 |ts -s '[%.T]'; makepkg_ret=$?" |