We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6a48b5 commit c678b73Copy full SHA for c678b73
1 file changed
semaphoreci.sh
@@ -19,8 +19,7 @@ export OS_NAME=linux
19
export FULL_BUILD="${PULL_REQUEST_NUMBER+false}"
20
# SemaphoreCI doesn't provide a convenient way to the base branch (e.g. master or stable)
21
if [ -n "${PULL_REQUEST_NUMBER:-}" ]; then
22
- # detect master/stable without querying the rate-limited API
23
- BRANCH="$(git describe --all | sed -E "s/.*\/([^-/]*)-.*/\1/")"
+ BRANCH=$((curl -fsSL https://api.github.com/repos/dlang/dmd/pulls/$PULL_REQUEST_NUMBER || echo) | jq -r '.base.ref')
24
# check if the detected branch actually exists and fallback to master
25
if ! git ls-remote --exit-code --heads https://github.com/dlang/dmd.git "$BRANCH" > /dev/null ; then
26
echo "Invalid branch detected: ${BRANCH} - falling back to master"
0 commit comments