Skip to content
Snippets Groups Projects
Commit 2c5066f1 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

DRTVWR-601: Use viewer-build-util/which-branch to determine branch.

parent 6f4dcd58
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
...@@ -99,10 +99,17 @@ jobs: ...@@ -99,10 +99,17 @@ jobs:
if: runner.os == 'Windows' if: runner.os == 'Windows'
run: choco install nsis-unicode run: choco install nsis-unicode
- name: Determine source branch
id: which-branch
uses: secondlife/viewer-build-util/which-branch@v1
with:
token: ${{ github.token }}
- name: Build - name: Build
id: build id: build
shell: bash shell: bash
env: env:
AUTOBUILD_VCS_BRANCH: ${{ steps.which-branch.outputs.branch }}
RUNNER_OS: ${{ runner.os }} RUNNER_OS: ${{ runner.os }}
run: | run: |
# set up things the viewer's build.sh script expects # set up things the viewer's build.sh script expects
...@@ -153,7 +160,7 @@ jobs: ...@@ -153,7 +160,7 @@ jobs:
} }
repo_branch() repo_branch()
{ {
git -C "$1" branch | grep '^* ' | cut -c 3- echo "$AUTOBUILD_VCS_BRANCH"
} }
record_dependencies_graph() record_dependencies_graph()
{ {
...@@ -195,11 +202,6 @@ jobs: ...@@ -195,11 +202,6 @@ jobs:
fi fi
export PYTHON_COMMAND_NATIVE="$(native_path "$PYTHON_COMMAND")" export PYTHON_COMMAND_NATIVE="$(native_path "$PYTHON_COMMAND")"
# branch will be something like "origin/mybranch"
branch="$(git branch -r --contains ${{ github.event.pull_request.head.sha || github.sha }} | head -n 1)"
# strip off "origin/"
export AUTOBUILD_VCS_BRANCH="${branch#*/}"
./build.sh ./build.sh
# Each artifact is downloaded as a distinct .zip file. Multiple jobs # Each artifact is downloaded as a distinct .zip file. Multiple jobs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment