зеркало из https://github.com/microsoft/bedrock.git
Change build.sh script to point to Helm 2 compatible version of Fabrikate (#1451)
* Change get_fab_version functionality to find the latest version of the supplied Major version. * Add v prefix to fabrikate major version * Remove v from major version
This commit is contained in:
Родитель
a2ef0541d7
Коммит
ce52a2e29f
|
@ -28,13 +28,21 @@ function helm_init() {
|
|||
}
|
||||
|
||||
# Obtain version for Fabrikate
|
||||
# If the version number is not provided, then download the latest
|
||||
# If the version number is not provided, then download the latest Helm2 compatible version
|
||||
# The Major version number can be provided as the first argument,
|
||||
function get_fab_version() {
|
||||
# shellcheck disable=SC2153
|
||||
if [ -z "$VERSION" ]
|
||||
then
|
||||
# By default, the script will use the most recent non-prerelease, non-draft release Fabrikate
|
||||
VERSION_TO_DOWNLOAD=$(curl -s "https://api.github.com/repos/microsoft/fabrikate/releases/latest" | grep "tag_name" | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
# By default, the script will use the Helm 2 compatible, non-prerelease, non-draft release Fabrikate.
|
||||
MAJOR=${1:-0}
|
||||
VERSIONS=$(curl -s "https://api.github.com/repos/microsoft/fabrikate/git/matching-refs/tags/$MAJOR" | grep "/refs/tags/$MAJOR" | while read -r line ; do
|
||||
VERSION=${line##*/}
|
||||
VERSION=${VERSION%\",}
|
||||
echo "$VERSION"
|
||||
done | sort -V)
|
||||
VERSION_TO_DOWNLOAD=${VERSIONS##*$'\n'}
|
||||
echo $VERSION_TO_DOWNLOAD
|
||||
else
|
||||
echo "Fabrikate Version: $VERSION"
|
||||
VERSION_TO_DOWNLOAD=$VERSION
|
||||
|
|
Загрузка…
Ссылка в новой задаче