Commit 6f6b1dee authored by Chaoting Liu's avatar Chaoting Liu

recv keys before build

parent 3d12dbc3
# Based upon
# Based upon
# https://github.com/Alexpux/MINGW-packages/blob/master/ci-library.sh
# and https://github.com/episource/archlinux-overlay
......@@ -11,13 +11,13 @@ function _log() {
local type="${1}"
shift
local msg="${@}"
local normal='\e[0m'
local red='\e[1;31m'
local red='\e[1;31m'
local green='\e[1;32m'
local yellow='\e[1;33m'
local cyan='\e[1;36m'
case "${type}" in
failure) echo -e "$red$msg$normal" ;;
success) echo -e "$green$msg$normal" ;;
......@@ -128,7 +128,7 @@ function list_packages() {
for _package in "${_packages[@]}"; do
PACKAGES+=("${_package}")
done
# check if there are some .order file
_list_changes _orders '*.order' '%' --no-commit-id --pretty=format: --name-only -r --diff-filter=AM || return 1
if [ -n "$_orders" ]; then
......@@ -166,11 +166,11 @@ function get_validpgpkeys() {
_package_info "$p" validpgpkeys
_VALIDPGPKEYS+=(${validpgpkeys[@]})
done
# get unique keys
_VALIDPGPKEYS=($(echo "${_VALIDPGPKEYS[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))
echo "${_VALIDPGPKEYS[@]}"
_do gpg --recv-keys "${_VALIDPGPKEYS[@]}" --keyserver keys.openpgp.org
}
# Sort packages by dependency
......@@ -241,7 +241,8 @@ function get_repository() {
# builds all $PACKAGES in the given order
function build_packages() {
_log build_step "Start building packages: ${PACKAGES[@]}"
_log get_validpgpkeys
for p in "${PACKAGES[@]}"; do
# resync to update local repo
_do sudo pacman -Sy --noconfirm
......@@ -251,7 +252,7 @@ function build_packages() {
_do makepkg --noconfirm --rmdeps --noprogressbar --nosign --syncdeps --cleanbuild --log --config ~/.makepkg.conf
popd
done
_log success "Done building packages!"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment