build(quic): bundle Linux runtime libraries [CI]
This commit is contained in:
1 parent
e2e5e437cb
commit
29d998bc94
18 files changed
+227
-15
No files matched your search
@@ -9,9 +9,21 @@ root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
version="$(sed -n 's#.*<Version>\(.*\)</Version>.*#\1#p' "$root/Directory.Build.props" | head -1)"
|
||||
name="moshiro-$role-$version-$rid"
|
||||
stage="$root/backend/artifacts/packages/stage/$name"
|
||||
quic_runtime="$root/backend/artifacts/packages/quic-runtime/$rid"
|
||||
|
||||
rm -rf "$stage"
|
||||
mkdir -p "$stage/systemd"
|
||||
if [[ "$rid" == linux-* ]]; then
|
||||
if command -v pwsh >/dev/null 2>&1; then
|
||||
pwsh -NoProfile -File "$root/ci/Bundle-QuicRuntime.ps1" -RuntimeIdentifier "$rid" -Destination "$quic_runtime"
|
||||
elif command -v pwsh.exe >/dev/null 2>&1 && command -v wslpath >/dev/null 2>&1; then
|
||||
pwsh.exe -NoProfile -File "$(wslpath -w "$root/ci/Bundle-QuicRuntime.ps1")" -RuntimeIdentifier "$rid" -Destination "$(wslpath -w "$quic_runtime")"
|
||||
else
|
||||
echo "PowerShell 7 is required to bundle the Linux QUIC runtime" >&2
|
||||
exit 2
|
||||
fi
|
||||
cp "$quic_runtime"/*.so.* "$stage/"
|
||||
fi
|
||||
cp "$root/backend/artifacts/publish/$role/$rid/moshiro-$role" "$stage/"
|
||||
cp "$root/packaging/install.sh" "$stage/"
|
||||
cp "$root/packaging/systemd/moshiro-$role.service" "$stage/systemd/"
|
||||
|
||||
Reference in new issue
Block a user