Skip to content

Commit 27d1c96

Browse files
committed
Added --no-open arg to MakeReleaseBuild
1 parent e2b2273 commit 27d1c96

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

.github/workflows/linux-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: ./gen_proj_linux.sh
2323

2424
- name: Make Release Build
25-
run: bash Scripts/Linux/MakeReleaseBuild.sh
25+
run: bash Scripts/Linux/MakeReleaseBuild.sh --no-open
2626

2727
- name: Get Version
2828
id: version

.github/workflows/windows-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: microsoft/setup-msbuild@v2
2323

2424
- name: Make Release Build
25-
run: .\Scripts\Windows\MakeReleaseBuild.bat
25+
run: .\Scripts\Windows\MakeReleaseBuild.bat --no-open
2626

2727
- name: Get Version
2828
id: version

Scripts/Linux/MakeReleaseBuild.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#!/bin/bash
22

33
SCRIPT_DIR="$(dirname "$0")"
4+
NO_OPEN=false
5+
6+
# Parse arguments
7+
for arg in "$@"; do
8+
if [ "$arg" = "--no-open" ]; then
9+
NO_OPEN=true
10+
fi
11+
done
412

513
# Build Debug
614
"$SCRIPT_DIR/BuildAll.sh" debug
@@ -52,7 +60,7 @@ fi
5260

5361
popd > /dev/null
5462

55-
# Open the output folder in the file manager (if available)
56-
if command -v xdg-open &> /dev/null; then
63+
# Open the output folder in the file manager (if available and not disabled)
64+
if [ "$NO_OPEN" = false ] && command -v xdg-open &> /dev/null; then
5765
xdg-open "$SCRIPT_DIR/../../Releases"
5866
fi

Scripts/Windows/MakeReleaseBuild.bat

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
pushd "%~dp0"
22

3+
set NO_OPEN=false
4+
if "%1"=="--no-open" set NO_OPEN=true
5+
36
call .\BuildAll.bat Debug
47
if %ERRORLEVEL% neq 0 (
58
echo Debug build failed. Exiting.
@@ -46,8 +49,8 @@ if exist ..\Releases\Overload-%version%-%platform% (
4649
echo Temporary build deleted.
4750
)
4851

49-
:: Open the output folder in the file explorer
50-
explorer ..\Releases
52+
:: Open the output folder in the file explorer (if not disabled)
53+
if "%NO_OPEN%"=="false" explorer ..\Releases
5154

5255
:: Return to the original directory
5356
popd

0 commit comments

Comments
 (0)