Skip to content

Commit dc31460

Browse files
committed
Allow triggering an EDU build with a tag containing "edu"
1 parent f5e2708 commit dc31460

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
@@ -220,20 +220,29 @@ jobs:
220220
[[ "$arch" == "MINGW6" ]] && arch=CYGWIN
221221
export AUTOBUILD="$(which autobuild)"
222222
223-
# determine the viewer channel from the branch name
224-
branch=$AUTOBUILD_VCS_BRANCH
225-
IFS='/' read -ra ba <<< "$branch"
226-
prefix=${ba[0]}
227-
if [ "$prefix" == "project" ]; then
228-
IFS='_' read -ra prj <<< "${ba[1]}"
229-
# uppercase first letter of each word
230-
export viewer_channel="Second Life Project ${prj[*]^}"
231-
elif [[ "$prefix" == "release" || "$prefix" == "main" ]];
223+
# determine the viewer channel from the branch or tag name
224+
# trigger an EDU build by including "edu" in the tag
225+
edu=${{ github.ref_type == 'tag' && contains(github.ref_name, 'edu') }}
226+
echo "ref_type=${{ github.ref_type }}, ref_name=${{ github.ref_name }}, edu='$edu'"
227+
if [[ "$edu" == "true" ]]
232228
then
233-
export viewer_channel="Second Life Release"
229+
export viewer_channel="Second Life Release edu"
234230
else
235-
export viewer_channel="Second Life Test"
231+
branch=$AUTOBUILD_VCS_BRANCH
232+
IFS='/' read -ra ba <<< "$branch"
233+
prefix=${ba[0]}
234+
if [ "$prefix" == "project" ]; then
235+
IFS='_' read -ra prj <<< "${ba[1]}"
236+
# uppercase first letter of each word
237+
export viewer_channel="Second Life Project ${prj[*]^}"
238+
elif [[ "$prefix" == "release" || "$prefix" == "main" ]];
239+
then
240+
export viewer_channel="Second Life Release"
241+
else
242+
export viewer_channel="Second Life Test"
243+
fi
236244
fi
245+
echo "viewer_channel=$viewer_channel"
237246
echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT"
238247
# On windows we need to point the build to the correct python
239248
# as neither CMake's FindPython nor our custom Python.cmake module

0 commit comments

Comments
 (0)