27 lines
731 B
Bash
Executable File
27 lines
731 B
Bash
Executable File
#!/bin/bash
|
|
|
|
generic_consumer_version='0.15'
|
|
sha=$(git rev-parse --short HEAD)
|
|
version="$generic_consumer_version+$sha"
|
|
|
|
echo Publishing version: $version
|
|
|
|
set -e
|
|
|
|
if [ -f config/consul.yml ]; then # canvas is running in docker
|
|
docker-compose run --rm --no-deps \
|
|
-e RAILS_ENV=test \
|
|
web bundle exec pact-broker publish pacts/generic_consumer-canvas_lms_api.json \
|
|
-u $PACT_BROKER_USERNAME \
|
|
-p $PACT_BROKER_PASSWORD \
|
|
-b https://inst-pact-broker.inseng.net \
|
|
-a $version
|
|
else
|
|
RAILS_ENV=test \
|
|
bundle exec pact-broker publish pacts/generic_consumer-canvas_lms_api.json \
|
|
-u $PACT_BROKER_USERNAME \
|
|
-p $PACT_BROKER_PASSWORD \
|
|
-b https://inst-pact-broker.inseng.net \
|
|
-a $version
|
|
fi
|