build: add alpine support to matrix builds (#1349)

This commit is contained in:
Geoff Bourne
2022-02-11 21:00:24 -06:00
committed by GitHub
parent 1458329e97
commit 179bb267fb
13 changed files with 125 additions and 337 deletions

View File

@@ -227,7 +227,7 @@ function extract() {
application/zip)
unzip -q -d "${destDir}" "${src}"
;;
application/x-tar|application/gzip|application/x-gzip|application/x-bzip2|application/zstd)
application/x-tar|application/gzip|application/x-gzip|application/x-bzip2|application/zstd|application/x-zstd)
tar -C "${destDir}" -xf "${src}"
;;
*)
@@ -237,11 +237,15 @@ function extract() {
esac
}
function getDistro() {
cat /etc/os-release | grep -E "^ID=" | cut -d= -f2 | sed -e 's/"//g'
}
function checkSum() {
local sum_file=${1?}
# Get distro
distro=$(cat /etc/os-release | grep -E "^ID=" | cut -d= -f2 | sed -e 's/"//g')
distro=$(getDistro)
if [ "${distro}" == "debian" ] && sha1sum -c "${sum_file}" --status 2> /dev/null; then
return 0