File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ runs:
146146
147147 # Install the runner
148148 if [ "$VERSION_TYPE" = "latest" ]; then
149- curl -fsSL http ://github.com/CodSpeedHQ/codspeed/releases/latest/download/codspeed-runner-installer .sh | bash -s -- --quiet
149+ curl -fsSL https ://codspeed.io/install .sh | bash -s -- --quiet
150150 elif [ "$VERSION_TYPE" = "branch" ]; then
151151 # Install from specific branch using cargo
152152 source $HOME/.cargo/env
@@ -157,13 +157,15 @@ runs:
157157 cargo install --locked --git https://github.com/CodSpeedHQ/codspeed --rev "$RUNNER_VERSION" codspeed-runner
158158 else
159159 # Release version
160- head_status=$(curl -I -fsSL -w "%{http_code}" -o /dev/null https://github.com/CodSpeedHQ/codspeed/releases/download/v$RUNNER_VERSION/codspeed-runner-installer.sh)
161- if [ "$head_status" -eq 404 ]; then
162- echo "Error: Version $RUNNER_VERSION is not available in https://github.com/CodSpeedHQ/codspeed/releases, please a correct version."
160+ response=$(curl -sSL -w "\n%{http_code}" https://codspeed.io/v$RUNNER_VERSION/install.sh)
161+ http_code=$(echo "$response" | tail -n1)
162+ if [ "$http_code" -ge 400 ]; then
163+ body=$(echo "$response" | sed '$d')
164+ error_msg=$(echo "$body" | jq -r '.error // empty' 2>/dev/null)
165+ echo "::error title=Failed to install CodSpeed CLI::Installation of CodSpeed CLI with version $RUNNER_VERSION failed.%0AReason: ${error_msg:-$body}"
163166 exit 1
164- else
165- curl -fsSL https://github.com/CodSpeedHQ/codspeed/releases/download/v$RUNNER_VERSION/codspeed-runner-installer.sh | bash -s -- --quiet
166167 fi
168+ echo "$response" | sed '$d' | bash -s -- --quiet
167169 fi
168170
169171 # Build the runner arguments array
You can’t perform that action at this time.
0 commit comments