From ea21664f251d21540d29f952bdbbef347056ccc8 Mon Sep 17 00:00:00 2001 From: Qian Hong Date: Tue, 16 Feb 2016 20:50:29 +0800 Subject: [PATCH] CI: Update core packages before full system upgrade. --- appveyor.yml | 2 ++ ci-build.sh | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f9613965e0..52d43ae0b2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,2 +1,4 @@ build_script: + # TODO: implement update-core --noconfirm and replace the below command line + - C:\msys64\usr\bin\pacman --sync --refresh --refresh --needed --noconfirm msys2-runtime msys2-runtime-devel bash pacman pacman-mirrors - C:\msys64\usr\bin\bash --login -c "$(cygpath ${APPVEYOR_BUILD_FOLDER})/ci-build.sh" diff --git a/ci-build.sh b/ci-build.sh index acd9e6e035..03e0f3724d 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -17,12 +17,6 @@ failure() { echo -e "\n${red}[MSYS2 CI] FAILURE:${normal} ${@}.\n"; exit 1; } gitconf() { test -n "$(git config ${1})" && return 0; git config --global "${1}" "${2}"; } execute() { status "${package:+$package: }${1}"; ${@:2} || failure "${package}: ${1} failed"; } -# Prepare -# TODO: implement update-core --noconfirm and move update process to outside this script -execute 'Upgrading the system' pacman --sync --refresh --refresh --sysupgrade --noconfirm --noprogressbar -gitconf user.name 'MSYS2 Continuous Integration' || failure 'Could not configure Git for makepkg' -gitconf user.email 'ci@msys2.org' || failure 'Could not configure Git for makepkg' - # Detect cd "$(dirname "$0")" commit_range="$(git log -1 --pretty=format:%P | cut -d' ' -f1)..HEAD" @@ -31,6 +25,11 @@ for file in "${files[@]}"; do [[ "${file}" = */PKGBUILD ]] && packages+=("${file test -n "${files}" || failure 'Could not detect changed files' test -z "${packages}" && success 'No changes in package recipes' +# Prepare +execute 'Upgrading the system' pacman --sync --refresh --refresh --sysupgrade --noconfirm --noprogressbar +gitconf user.name 'MSYS2 Continuous Integration' || failure 'Could not configure Git for makepkg' +gitconf user.email 'ci@msys2.org' || failure 'Could not configure Git for makepkg' + # Build and install status 'Building changed packages:' for package in "${packages[@]}"; do printf "\t${package}\n"; done