mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-16 10:48:47 +00:00
bug6173: in refreshInstance.sh load at least the newest 100 releases from GitHub
This commit is contained in:
+2
-2
@@ -153,11 +153,11 @@ install_environment ()
|
||||
load_from_release_file ()
|
||||
{
|
||||
if [[ ${INSTALL_FROM_RELEASE} == "" ]]; then
|
||||
GITHUB_RELEASE=$( curl -L https://api.github.com/repos/SAP/sailing-analytics/releases 2>/dev/null | jq -r 'sort_by(.created_at) | reverse | map(select(.name | startswith("main-")))[0].assets[] | select(.content_type=="application/x-tar")' )
|
||||
GITHUB_RELEASE=$( curl -L "https://api.github.com/repos/SAP/sailing-analytics/releases?per_page=100" 2>/dev/null | jq -r 'sort_by(.created_at) | reverse | map(select(.name | startswith("main-")))[0].assets[] | select(.content_type=="application/x-tar")' )
|
||||
INSTALL_FROM_RELEASE=$( echo "${GITHUB_RELEASE}" | jq -r '.name' | sed -e 's/\.tar\.gz$//' )
|
||||
echo "You didn't provide a release. Defaulting to latest main branch build ${INSTALL_FROM_RELEASE}"
|
||||
else
|
||||
GITHUB_RELEASE=$( curl -L https://api.github.com/repos/SAP/sailing-analytics/releases 2>/dev/null | jq -r 'sort_by(.created_at) | reverse | map(select(.name=="'${INSTALL_FROM_RELEASE}'"))[0].assets[] | select(.content_type=="application/x-tar")' )
|
||||
GITHUB_RELEASE=$( curl -L "https://api.github.com/repos/SAP/sailing-analytics/releases?per_page=100" 2>/dev/null | jq -r 'sort_by(.created_at) | reverse | map(select(.name=="'${INSTALL_FROM_RELEASE}'"))[0].assets[] | select(.content_type=="application/x-tar")' )
|
||||
fi
|
||||
if which mail; then
|
||||
if [ -n "${BUILD_COMPLETE_NOTIFY}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user