Skip to content

Commit 9160473

Browse files
committed
fix: refactor web-build.sh to correctly detect the option RUN_IN_CI
1 parent f0bd7b1 commit 9160473

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/web_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- name: Build
3131
run: |
32-
ENABLE_TESTING=1 RUN_IN_CI=true bash ./platforms/build-web.sh
32+
ENABLE_TESTING=1 bash ./platforms/build-web.sh complete_rebuild release CI
3333
3434
# TODO upload page to gh-pages!
3535
- name: Upload artifacts

platforms/build-web.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ export COMPILE_TYPE="smart"
117117

118118
export BUILDTYPE="debug"
119119

120+
export RUN_IN_CI="false"
121+
120122
if [ "$#" -eq 0 ]; then
121123
# nothing
122124
echo "Using compile type '$COMPILE_TYPE'"
@@ -125,8 +127,17 @@ elif [ "$#" -eq 1 ]; then
125127
elif [ "$#" -eq 2 ]; then
126128
COMPILE_TYPE="$1"
127129
BUILDTYPE="$2"
130+
elif [ "$#" -eq 3 ]; then
131+
COMPILE_TYPE="$1"
132+
BUILDTYPE="$2"
133+
134+
if [ -z "$3" ]; then
135+
RUN_IN_CI="false"
136+
else
137+
RUN_IN_CI="true"
138+
fi
128139
else
129-
echo "Too many arguments given, expected 1 or 2"
140+
echo "Too many arguments given, expected 1, 2 or 3"
130141
exit 1
131142
fi
132143

@@ -154,7 +165,8 @@ if [ "$COMPILE_TYPE" == "complete_rebuild" ] || [ ! -e "$BUILD_DIR" ]; then
154165
--cross-file "$CROSS_FILE" \
155166
"-Dbuildtype=$BUILDTYPE" \
156167
-Ddefault_library=static \
157-
-Dtests=false
168+
-Dtests=false \
169+
"-Drun_in_ci=$RUN_IN_CI"
158170

159171
fi
160172

0 commit comments

Comments
 (0)