Skip to content

allow fixing the version from an env var #35

@koenhandekyn

Description

@koenhandekyn

our system broke with change from 133.x to 134.x

currently we can only set the channel but we can't pin the version

it's a very small change to allow to pin the version which likely is relevant to provide

(we have it on a fork if needed)

snippet

# Detect requested version or channel or default to stable
if [ -f "$ENV_DIR/GOOGLE_CHROME_VERSION" ]; then
  VERSION=$(cat "$ENV_DIR/GOOGLE_CHROME_VERSION")
  echo "Using env var GOOGLE_CHROME_VERSION=$VERSION" | indent
else
  if [ -f "$ENV_DIR/GOOGLE_CHROME_CHANNEL" ]; then
    channel=$(cat "$ENV_DIR/GOOGLE_CHROME_CHANNEL")
    echo "Using env var GOOGLE_CHROME_CHANNEL=$channel" | indent
  else
    channel=stable
  fi
  # The current version endpoint requires ALL CAPS.
  CHANNEL="$(echo -n "$channel" | awk '{ print toupper($0) }')"
  VERSION="$(curl --silent --show-error --fail --retry 3 --retry-connrefused --connect-timeout 10 "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_$CHANNEL")"
  echo "Resolved $CHANNEL version $VERSION" | indent
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions