5a9b4f2af9fcd44f4b4cba1e93089bf0e513d8f7
configuration/environments_scripts/sailing_server/files/usr/local/bin/refreshInstance.sh
| ... | ... | @@ -153,11 +153,11 @@ install_environment () |
| 153 | 153 | load_from_release_file () |
| 154 | 154 | { |
| 155 | 155 | if [[ ${INSTALL_FROM_RELEASE} == "" ]]; then |
| 156 | - 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")' ) |
|
| 156 | + 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")' ) |
|
| 157 | 157 | INSTALL_FROM_RELEASE=$( echo "${GITHUB_RELEASE}" | jq -r '.name' | sed -e 's/\.tar\.gz$//' ) |
| 158 | 158 | echo "You didn't provide a release. Defaulting to latest main branch build ${INSTALL_FROM_RELEASE}" |
| 159 | 159 | else |
| 160 | - 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")' ) |
|
| 160 | + 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")' ) |
|
| 161 | 161 | fi |
| 162 | 162 | if which mail; then |
| 163 | 163 | if [ -n "${BUILD_COMPLETE_NOTIFY}" ]; then |