Skip to content

Commit ce3a699

Browse files
buchwasabuchwasa
authored andcommitted
Add a command line option for runtime
1 parent d3cd32d commit ce3a699

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

src/osx/Installer.Mac/layout.sh

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,6 @@ GITLAB_UI_SRC="$SRC/shared/GitLab.UI.Avalonia"
2828
# Build parameters
2929
FRAMEWORK=net6.0
3030

31-
TEST_ARCH=`uname -m`
32-
case $TEST_ARCH in
33-
"x86_64")
34-
RUNTIME="osx-x64"
35-
;;
36-
"arm64")
37-
RUNTIME="osx-arm64"
38-
;;
39-
*)
40-
die "Unknown architecture '$TEST_ARCH'"
41-
;;
42-
esac
43-
44-
echo "Building for runtime '$RUNTIME'"
45-
4631
# Parse script arguments
4732
for i in "$@"
4833
do
@@ -55,6 +40,10 @@ case "$i" in
5540
PAYLOAD="${i#*=}"
5641
shift # past argument=value
5742
;;
43+
--runtime=*)
44+
RUNTIME="${i#*=}"
45+
shift # past argument=value
46+
;;
5847
--symbol-output=*)
5948
SYMBOLOUT="${i#*=}"
6049
;;
@@ -64,6 +53,24 @@ case "$i" in
6453
esac
6554
done
6655

56+
# Determine a runtime if one was not provided
57+
if [ -z "$RUNTIME" ]; then
58+
TEST_ARCH=`uname -m`
59+
case $TEST_ARCH in
60+
"x86_64")
61+
RUNTIME="osx-x64"
62+
;;
63+
"arm64")
64+
RUNTIME="osx-arm64"
65+
;;
66+
*)
67+
die "Unknown architecture '$TEST_ARCH'"
68+
;;
69+
esac
70+
fi
71+
72+
echo "Building for runtime '$RUNTIME'"
73+
6774
# Perform pre-execution checks
6875
CONFIGURATION="${CONFIGURATION:=Debug}"
6976
if [ -z "$PAYLOAD" ]; then

0 commit comments

Comments
 (0)