From 33159233fd161877ffe37187bf06689fe0e8bea2 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Mon, 23 Oct 2017 23:03:23 +0200 Subject: Fix RID extraction in packages and test build for Alpine (#14656) * Fix RID extraction in packages and test build for Alpine The host RID extraction in build-packages.sh and build-test.sh was not matching the one in build.sh * Reflect feedback --- build-test.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'build-test.sh') diff --git a/build-test.sh b/build-test.sh index 48d9a1f604..e560faf3f5 100755 --- a/build-test.sh +++ b/build-test.sh @@ -2,15 +2,30 @@ initHostDistroRid() { + __HostDistroRid="" if [ "$__HostOS" == "Linux" ]; then - if [ ! -e /etc/os-release ]; then - echo "WARNING: Can not determine runtime id for current distro." - __HostDistroRid="" - else + if [ -e /etc/os-release ]; then source /etc/os-release + if [[ $ID == "alpine" ]]; then + # remove the last version digit + VERSION_ID=${VERSION_ID%.*} + fi __HostDistroRid="$ID.$VERSION_ID-$__HostArch" + elif [ -e /etc/redhat-release ]; then + local redhatRelease=$(