mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
* add support for idmapped mounts to start-sdk * misc fixes * misc fixes * add default to textarea * fix iptables masquerade rule * fix textarea types * more fixes * better logging for rsync * fix tty size * fix wg conf generation for android * disable file mounts on dependencies * mostly there, some styling issues (#3069) * mostly there, some styling issues * fix: address comments (#3070) * fix: address comments * fix: fix * show SSL for any address with secure protocol and ssl added * better sorting and messaging --------- Co-authored-by: Alex Inkin <alexander@inkin.ru> * fixes for nextcloud * allow sidebar navigation during service state traansitions * wip: x-forwarded headers * implement x-forwarded-for proxy * lowercase domain names and fix warning popover bug * fix http2 websockets * fix websocket retry behavior * add arch filters to s9pk pack * use docker for start-cli install * add version range to package signer on registry * fix rcs < 0 * fix user information parsing * refactor service interface getters * disable idmaps * build fixes * update docker login action * streamline build * add start-cli workflow * rename * riscv64gc * fix ui packing * no default features on cli * make cli depend on GIT_HASH * more build fixes * more build fixes * interpolate arch within dockerfile * fix tests * add launch ui to service page plus other small improvements (#3075) * add launch ui to service page plus other small improvements * revert translation disable * add spinner to service list if service is health and loading * chore: some visual tune up * chore: update Taiga UI --------- Co-authored-by: waterplea <alexander@inkin.ru> * fix backups * feat: use arm hosted runners and don't fail when apt package does not exist (#3076) --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Shadowy Super Coder <musashidisciple@proton.me> Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com> Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: Remco Ros <remcoros@live.nl>
79 lines
1.7 KiB
Bash
Executable File
79 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
source ./builder-alias.sh
|
|
|
|
set -ea
|
|
|
|
INSTALL=false
|
|
while [[ $# -gt 0 ]]; do
|
|
case $1 in
|
|
--install)
|
|
INSTALL=true
|
|
shift
|
|
;;
|
|
*)
|
|
>&2 echo "Unknown option: $1"
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
shopt -s expand_aliases
|
|
|
|
PROFILE=${PROFILE:-release}
|
|
if [ "${PROFILE}" = "release" ]; then
|
|
BUILD_FLAGS="--release"
|
|
else
|
|
if [ "$PROFILE" != "debug"]; then
|
|
>&2 echo "Unknown profile $PROFILE: falling back to debug..."
|
|
PROFILE=debug
|
|
fi
|
|
fi
|
|
|
|
if [ -z "${ARCH:-}" ]; then
|
|
ARCH=$(uname -m)
|
|
fi
|
|
|
|
if [ "$ARCH" = "arm64" ]; then
|
|
ARCH="aarch64"
|
|
fi
|
|
|
|
RUST_ARCH="$ARCH"
|
|
if [ "$ARCH" = "riscv64" ]; then
|
|
RUST_ARCH="riscv64gc"
|
|
fi
|
|
|
|
if [ -z "${KERNEL_NAME:-}" ]; then
|
|
KERNEL_NAME=$(uname -s)
|
|
fi
|
|
|
|
if [ -z "${TARGET:-}" ]; then
|
|
if [ "$KERNEL_NAME" = "Linux" ]; then
|
|
TARGET="$RUST_ARCH-unknown-linux-musl"
|
|
elif [ "$KERNEL_NAME" = "Darwin" ]; then
|
|
TARGET="$RUST_ARCH-apple-darwin"
|
|
else
|
|
>&2 echo "unknown kernel $KERNEL_NAME"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
cd ..
|
|
FEATURES="$(echo "${ENVIRONMENT:-}" | sed 's/-/,/g')"
|
|
RUSTFLAGS=""
|
|
if [[ "${ENVIRONMENT:-}" =~ (^|-)console($|-) ]]; then
|
|
RUSTFLAGS="--cfg tokio_unstable"
|
|
fi
|
|
|
|
echo "FEATURES=\"$FEATURES\""
|
|
echo "RUSTFLAGS=\"$RUSTFLAGS\""
|
|
rust-zig-builder cargo zigbuild --manifest-path=./core/Cargo.toml $BUILD_FLAGS --no-default-features --features=docker,$FEATURES --locked --bin start-cli --target=$TARGET
|
|
if [ "$(ls -nd "core/target/$TARGET/$PROFILE/start-cli" | awk '{ print $3 }')" != "$UID" ]; then
|
|
rust-zig-builder sh -c "cd core && chown -R $UID:$UID target && chown -R $UID:$UID /usr/local/cargo"
|
|
fi
|
|
|
|
if [ "$INSTALL" = "true" ]; then
|
|
cp "core/target/$TARGET/$PROFILE/start-cli" ~/.cargo/bin/start-cli
|
|
fi |