Skip to content

Commit 633e200

Browse files
Merge pull request #2275 from secondlife/nat/edu-channel
Allow triggering an EDU build with a tag containing "edu"
2 parents a52ba69 + 23f2631 commit 633e200

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

.github/workflows/build.yaml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -202,23 +202,32 @@ jobs:
202202
[[ "$arch" == "MINGW6" ]] && arch=CYGWIN
203203
export AUTOBUILD="$(which autobuild)"
204204
205-
# determine the viewer channel from the branch name
206-
branch=$AUTOBUILD_VCS_BRANCH
207-
IFS='/' read -ra ba <<< "$branch"
208-
prefix=${ba[0]}
209-
if [ "$prefix" == "project" ]; then
210-
IFS='_' read -ra prj <<< "${ba[1]}"
211-
# uppercase first letter of each word
212-
export viewer_channel="Second Life Project ${prj[*]^}"
213-
elif [[ "$prefix" == "release" || "$prefix" == "main" ]];
205+
# determine the viewer channel from the branch or tag name
206+
# trigger an EDU build by including "edu" in the tag
207+
edu=${{ github.ref_type == 'tag' && contains(github.ref_name, 'edu') }}
208+
echo "ref_type=${{ github.ref_type }}, ref_name=${{ github.ref_name }}, edu='$edu'"
209+
if [[ "$edu" == "true" ]]
214210
then
215-
export viewer_channel="Second Life Release"
211+
export viewer_channel="Second Life Release edu"
216212
elif [[ "$branch" == "develop" ]];
217213
then
218214
export viewer_channel="Second Life Develop"
219215
else
220-
export viewer_channel="Second Life Test"
216+
branch=$AUTOBUILD_VCS_BRANCH
217+
IFS='/' read -ra ba <<< "$branch"
218+
prefix=${ba[0]}
219+
if [ "$prefix" == "project" ]; then
220+
IFS='_' read -ra prj <<< "${ba[1]}"
221+
# uppercase first letter of each word
222+
export viewer_channel="Second Life Project ${prj[*]^}"
223+
elif [[ "$prefix" == "release" || "$prefix" == "main" ]];
224+
then
225+
export viewer_channel="Second Life Release"
226+
else
227+
export viewer_channel="Second Life Test"
228+
fi
221229
fi
230+
echo "viewer_channel=$viewer_channel"
222231
echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT"
223232
# On windows we need to point the build to the correct python
224233
# as neither CMake's FindPython nor our custom Python.cmake module

0 commit comments

Comments
 (0)