Skip to content

Commit 312c4b9

Browse files
committed
Update release.yml
Workaround to deal with plugins like readyup's include system.
1 parent 7bce1b1 commit 312c4b9

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ jobs:
6565
6666
if [ -z "${BUILT[$name]:-}" ]; then
6767
if [ -f "$SCRIPTING/$name.sp" ]; then
68-
src="$SCRIPTING/$name.sp"
68+
base="$SCRIPTING"
6969
inc="$SCRIPTING/include"
7070
elif [ -f "$SCRIPTING/sourcemod/$name.sp" ]; then
7171
# Stock SourceMod plugins live one level down with their
7272
# own include tree.
73-
src="$SCRIPTING/sourcemod/$name.sp"
73+
base="$SCRIPTING/sourcemod"
7474
inc="$SCRIPTING/sourcemod/include"
7575
else
7676
echo "::error::No .sp source found for shipped plugin '$name' ($smx)"
@@ -79,10 +79,15 @@ jobs:
7979
fi
8080
8181
echo "Compiling $name ..."
82-
if "$COMPILER" -E -w234 -w217 -O2 -v2 -i "$inc" "-o$BUILD/$name.smx" "$src"; then
82+
# Run with cwd = the scripting dir and a bare source filename,
83+
# exactly like check_plugins.yml: some plugins (e.g. readyup)
84+
# use working-directory-relative quoted #includes that only
85+
# resolve from there. -i / -o / $BUILD are absolute, so the
86+
# subshell cd does not affect them.
87+
if ( cd "$base" && "$COMPILER" -E -w234 -w217 -O2 -v2 -i "$inc" "-o$BUILD/$name.smx" "$name.sp" ); then
8388
BUILT[$name]="$BUILD/$name.smx"
8489
else
85-
echo "::error::Failed to compile '$name' ($src)"
90+
echo "::error::Failed to compile '$name' ($base/$name.sp)"
8691
FAILED="$FAILED $name"
8792
continue
8893
fi

0 commit comments

Comments
 (0)