Tatiana Shepeleva
03/27/2023, 6:55 AMcan-i-deploy work with mainBranch concept? something like can-i-deploy -to-main-branch
Context: some of our projects use master as a default branch, and some main. can-i-deploy -to master fails for the latter, so we additionally tag contracts with master tag if their default branch is main. It looks hacky, and it might be an option on can-i-deploy instead.Roy Collings
03/27/2023, 7:28 AMgit remote show origin | grep "HEAD branch" | awk '{print $NF}'
... works for me. So you could assign that to a variable etc...Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Tatiana Shepeleva
03/27/2023, 7:39 AMIs the intent behind this more of the βcan I merge?β scenario?yeah-yeah, itβs about that
Tatiana Shepeleva
03/27/2023, 7:42 AMWould it work for you if you could dynamically get the main/master branch name?@Roy Collings do you mean that I could check each pair/contract separately? like, depending on what their default/main branch is?
Roy Collings
03/27/2023, 9:04 AM... can-i-deploy .... -to-main-branch you could instead do something like:
MAIN=$(git remote show origin | grep "HEAD branch" | awk '{print $NF}')
# (whatever your command is)
pact-broker can-i-deploy .... -to $MAINMatt (pactflow.io / pact-js / pact-go)