Sha256: 2a9709596f039694740a0b4ba2c3e605a68d9034552d1c80bece7cbfbc2e1087

Contents?: true

Size: 1.18 KB

Versions: 18

Compression:

Stored size: 1.18 KB

Contents

#!/bin/bash -e
# Copyright 2016 Google Inc. Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.

# Echoes the sass-spec Git ref that should be checked out for the current Travis
# run. If we're running specs for a pull request which refers to a sass-spec
# pull request, we'll run against the latter rather than sass-spec master.

default=master

if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
  >&2 echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST."
  >&2 echo "Ref: $default."
  echo "$default"
  exit 0
fi

>&2 echo "Fetching pull request $TRAVIS_PULL_REQUEST..."

url=https://api.github.com/repos/sass/ruby-sass/pulls/$TRAVIS_PULL_REQUEST
if [ -z "$GITHUB_AUTH" ]; then
    >&2 echo "Fetching pull request info without authentication"
    JSON=$(curl -L -sS $url)
else
    >&2 echo "Fetching pull request info as sassbot"
    JSON=$(curl -u "sassbot:$GITHUB_AUTH" -L -sS $url)
fi
>&2 echo "$JSON"

RE_SPEC_PR="sass\/sass-spec(#|\/pull\/)([0-9]+)"

if [[ $JSON =~ $RE_SPEC_PR ]]; then
  ref="pull/${BASH_REMATCH[2]}/head"
  >&2 echo "Ref: $ref."
  echo "$ref"
else
  >&2 echo "Ref: $default."
  echo "$default"
fi

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/sass-3.7.4/extra/sass-spec-ref.sh
sass-3.7.4 extra/sass-spec-ref.sh
sass-3.7.3 extra/sass-spec-ref.sh
sass-3.7.2 extra/sass-spec-ref.sh
sass-3.7.1 extra/sass-spec-ref.sh
sass-3.7.0 extra/sass-spec-ref.sh
sass-3.6.0 extra/sass-spec-ref.sh