Skip to content

Commit

Permalink
Merge pull request #517 from pact-foundation/chore/upgrade-to-pact-ru…
Browse files Browse the repository at this point in the history
…by-standalone-2-4-6

fix: update standalone to 2.4.6
  • Loading branch information
YOU54F authored Jun 17, 2024
2 parents ead4097 + cec3213 commit b0aea6f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion script/lib/download-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,19 @@ function download_to {
OUTPUT_FILE="$2"
debug_log "doing curl of: '$URL', saving in $OUTPUT_FILE"

HTTP_CODE="$(curl --silent --output "$OUTPUT_FILE" --write-out "%{http_code}" --location "$URL")"
if [[ "$(uname -m)" == "Darwin" ]] || [[ "$(uname -m)" == "Linux" ]]; then
HTTP_CODE="$(curl --silent --output "$OUTPUT_FILE" --write-out "%{http_code}" --location "$URL")"
else
# temp workaround for curl 8.8.x error on windows gha runners
# https://github.com/curl/curl/issues/13845
curl --silent --output "$OUTPUT_FILE" --location "$URL"
if [ $? -ne 0 ]; then
error "Unable to download file at url ${URL}"
exit 1
else
HTTP_CODE=200
fi
fi
debug_log "did curl, http code was '${HTTP_CODE}'"
if [[ "${HTTP_CODE}" -lt 200 || "${HTTP_CODE}" -gt 299 ]] ; then
error "Unable to download file at url ${URL}"
Expand Down
2 changes: 1 addition & 1 deletion standalone/install.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk = require('chalk');

// Get latest version from https://github.com/pact-foundation/pact-ruby-standalone/releases
export const PACT_STANDALONE_VERSION = '2.4.4';
export const PACT_STANDALONE_VERSION = '2.4.6';

function makeError(msg: string): Error {
return new Error(chalk.red(`Error while locating pact binary: ${msg}`));
Expand Down

0 comments on commit b0aea6f

Please sign in to comment.