diff options
author | bartus | 2019-06-07 01:32:21 +0200 |
---|---|---|
committer | bartoszek | 2019-06-09 14:49:09 +0200 |
commit | 621aeb899cd77e31fd320c8bcd275b389a74c6d7 (patch) | |
tree | 0594df0a93543f670a5636b8b47ffa61aca6f7a3 /.travis.yml | |
parent | 1cb0b28bc1131466ca20c4a39945bf84e44a5fd1 (diff) | |
download | aur-621aeb899cd77e31fd320c8bcd275b389a74c6d7.tar.gz |
add dependency update rebuild trigger
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 8ac4a3e8bb0e..b0ad7e2071ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,12 +34,22 @@ arch: - "update_interval=5" - 'update_offset=$(. PKGBUILD; sha1sum <<<"$pkgname"|sed -e "s/[a-z -]//g" -e "s/^0*//"|echo `cat`%$update_interval|bc)' - "next_update=$(((365-`date +%j`+update_offset)%update_interval))" +# check for (opt|)depends update + - | + build_deps=$(. PKGBUILD; IFS=$'\n'; echo -e "${depends[*]}\n${makedepends[*]}"; ) + echo -e "Build dependency:\n${build_deps[*]}" + new_deps_ver=$(for pkg in $build_deps; do pacman -S --print-format '%n %v' $pkg|tail -1; done;) + echo -e "Pacman dependency versions:\n$new_deps_ver" + build_info=$(curl -sL $(. PKGBUILD; pacman -S --print $pkgname|tail -n1)|bsdtar xJOf - .BUILDINFO|grep -Po '^installed = \K.*'|rev|while IFS=$'-' read arch pkgrel pkgver pkgname; do echo $pkgrel-$pkgver $pkgname; done|rev) + old_deps_ver=$(echo "$build_info"|grep -f <(echo -e "$build_deps" )) + echo -e "AUR-repo. BUILDINFO dependency versions:\n$old_deps_ver" + dep_update=$(diff -y --suppress-common-lines <(echo "$old_deps_ver"|sort) <(echo "$new_deps_ver"|sort) >&2; echo $?;) # force update on commit message containing [force|rebuild] - - "force_update=$(git log --pretty=%B -1|egrep -q '\[(force|rebuild)\]'; echo $?" + - 'force_update=$(git log --pretty=%B -1|egrep -q "\[(force|rebuild)\]"; echo $?)' - "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" && $next_update != 0 && $force_update != 0 ]] && { echo -e "Current version is up to date!\nNext force update in $next_update days!"; exit 0; }' + - '[[ "$new_pkgver" == "$old_pkgver" && $next_update != 0 && $force_update != 0 && dep_update != 0 ]] && { echo -e "Current version is up to date!\nNext force update in $next_update days!"; exit 0; }' # exit with makepkg return code - "set -o pipefail" - "makepkg -s --noconfirm TRAVIS=1 MAKEFLAGS='-j2' 2>&1 |ts -s '[%.T]'; makepkg_ret=$?" |