-
Notifications
You must be signed in to change notification settings - Fork 5
/
build32.sh
executable file
·40 lines (36 loc) · 1.56 KB
/
build32.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
cd "$(dirname "$0")"
DIR="$(pwd)"
source 'ci-library.sh'
cd r
mkdir ../artifacts
git_config user.email '[email protected]'
git_config user.name 'MSYS2 Continuous Integration'
[ ! -e ~/.gnupg/gpg.conf ] && mkdir -p ~/.gnupg && echo -e "keyserver keyserver.ubuntu.com\nkeyserver-options auto-key-retrieve" > ~/.gnupg/gpg.conf
packages=( "$@" )
test -z "${packages}" && success 'No packages - no-op'
pacman -Rnsc --noconfirm cocom automake1.{6,7,8,9,10}
define_build_order || failure 'Could not determine build order'
# Build
message 'Building packages' "${packages[@]}"
execute 'Updating system' update_system
execute 'Approving recipe quality' check_recipe_quality
for package in "${packages[@]}"; do
execute 'Fetch keys' "$DIR/fetch-validpgpkeys.sh"
execute 'Building binary' makepkg --noconfirm --noprogressbar --nocheck --syncdeps --rmdeps --cleanbuild
execute 'Building source' makepkg --noconfirm --noprogressbar --allsource
grep -qFx "${package}" ../ci-dont-install-list.txt || execute 'Installing' yes:pacman --noprogressbar --noconfirm --upgrade *.pkg.tar.*
execute 'Checking dll depencencies' list_dll_deps ./pkg
mv "${package}"/*.pkg.tar.* ../artifacts
mv "${package}"/*.src.tar.zst ../artifacts
unset package
done
# Deploy
cd ../artifacts
# work around github issue with ~ in file name (turns into .)
for a in *~*; do
mv "$a" "`tr '~' '.' <<<"$a"`"
done
execute 'Generating pacman repository' create_pacman_repository "${PACMAN_REPOSITORY_NAME:-ci-build}"
execute 'SHA-256 checksums' sha256sum *
success 'All artifacts built successfully'