Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(publish-provider-contract): ensure branch is set from input #51

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions publish-provider-contract/publishOAS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ verification_exit_code=${verification_exit_code:-0}
verifier=${verifier:-'github-actions'}
VERIFICATION_RESULTS_FORMAT=${verification_results_format:-'text'}

branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" = "" ]; then
branch=$(git rev-parse --abbrev-ref HEAD)
fi

TAG_COMMAND=
if [ "$tag" ]; then
Expand All @@ -46,13 +48,12 @@ fi


echo """
URL: $URL
PACT_BROKER_TOKEN : $PACT_BROKER_TOKEN
PACT_BROKER_BASE_URL: $PACT_BROKER_BASE_URL
contract: $contract
results_file: $results_file
EXIT_CODE: $EXIT_CODE
BRANCH: $BRANCH
BUILD_URL: $BUILD_URL
verification_results: $verification_results
verification_exit_code: $verification_exit_code
branch: $branch
build_url: $build_url
"""

docker run --rm \
Expand All @@ -65,7 +66,7 @@ docker run --rm \
$contract \
--provider $application_name \
--provider-app-version $version \
--branch $BRANCH \
--branch $branch \
--specification $SPECIFICATION \
--content-type $CONTRACT_FILE_CONTENT_TYPE \
--verification-exit-code=$verification_exit_code \
Expand Down
Loading