File tree Expand file tree Collapse file tree 3 files changed +38
-31
lines changed
src/linux/Packaging.Linux Expand file tree Collapse file tree 3 files changed +38
-31
lines changed Original file line number Diff line number Diff line change @@ -49,28 +49,10 @@ if [ ! -d "$INSTALL_PREFIX" ]; then
49
49
mkdir -p " $INSTALL_PREFIX "
50
50
fi
51
51
52
- # Fall back to host architecture if no explicit runtime is given.
53
- if test -z " $RUNTIME " ; then
54
- HOST_ARCH=" ` dpkg-architecture -q DEB_HOST_ARCH` "
55
-
56
- case $HOST_ARCH in
57
- amd64)
58
- RUNTIME=" linux-x64"
59
- ;;
60
- arm64)
61
- RUNTIME=" linux-arm64"
62
- ;;
63
- armhf)
64
- RUNTIME=" linux-arm"
65
- ;;
66
- * )
67
- die " Could not determine host architecture!"
68
- ;;
69
- esac
52
+ if [ ! -z " $RUNTIME " ]; then
53
+ echo " Building for runtime ${RUNTIME} "
70
54
fi
71
55
72
- echo " Building for runtime ${RUNTIME} "
73
-
74
56
# Perform pre-execution checks
75
57
CONFIGURATION=" ${CONFIGURATION:= Debug} "
76
58
if [ -z " $VERSION " ]; then
Original file line number Diff line number Diff line change @@ -44,10 +44,6 @@ PROJ_OUT="$OUT/linux/Packaging.Linux"
44
44
# Build parameters
45
45
FRAMEWORK=net8.0
46
46
47
- if [ -z " $RUNTIME " ]; then
48
- die " --runtime was not set"
49
- fi
50
-
51
47
# Perform pre-execution checks
52
48
CONFIGURATION=" ${CONFIGURATION:= Debug} "
53
49
76
72
77
73
# Publish core application executables
78
74
echo " Publishing core application..."
79
- $DOTNET_ROOT /dotnet publish " $GCM_SRC " \
80
- --configuration=" $CONFIGURATION " \
81
- --framework=" $FRAMEWORK " \
82
- --runtime=" $RUNTIME " \
83
- --self-contained \
84
- -p:PublishSingleFile=true \
85
- --output=" $( make_absolute " $PAYLOAD " ) " || exit 1
75
+ if [ -z " $RUNTIME " ]; then
76
+ $DOTNET_ROOT /dotnet publish " $GCM_SRC " \
77
+ --configuration=" $CONFIGURATION " \
78
+ --framework=" $FRAMEWORK " \
79
+ --self-contained \
80
+ -p:PublishSingleFile=true \
81
+ --output=" $( make_absolute " $PAYLOAD " ) " || exit 1
82
+ else
83
+ $DOTNET_ROOT /dotnet publish " $GCM_SRC " \
84
+ --configuration=" $CONFIGURATION " \
85
+ --framework=" $FRAMEWORK " \
86
+ --runtime=" $RUNTIME " \
87
+ --self-contained \
88
+ -p:PublishSingleFile=true \
89
+ --output=" $( make_absolute " $PAYLOAD " ) " || exit 1
90
+ fi
86
91
87
92
# Collect symbols
88
93
echo " Collecting managed symbols..."
Original file line number Diff line number Diff line change @@ -100,6 +100,26 @@ INSTALL_TO="$DEBROOT/usr/local/share/gcm-core/"
100
100
LINK_TO=" $DEBROOT /usr/local/bin/"
101
101
mkdir -p " $DEBROOT /DEBIAN" " $INSTALL_TO " " $LINK_TO " || exit 1
102
102
103
+ # Fall back to host architecture if no explicit runtime is given.
104
+ if test -z " $RUNTIME " ; then
105
+ HOST_ARCH=" ` dpkg-architecture -q DEB_HOST_ARCH` "
106
+
107
+ case $HOST_ARCH in
108
+ amd64)
109
+ RUNTIME=" linux-x64"
110
+ ;;
111
+ arm64)
112
+ RUNTIME=" linux-arm64"
113
+ ;;
114
+ armhf)
115
+ RUNTIME=" linux-arm"
116
+ ;;
117
+ * )
118
+ die " Could not determine host architecture!"
119
+ ;;
120
+ esac
121
+ fi
122
+
103
123
# Determine architecture for debian control file from the runtime architecture
104
124
case $RUNTIME in
105
125
linux-x64)
You can’t perform that action at this time.
0 commit comments