Warp to Galaxy internal rebrand
This commit is contained in:
+22
-81
@@ -97,8 +97,8 @@ UNIVERSAL_BINARY=true
|
||||
BUILD_BINARY=true
|
||||
TARGET_ARCH=""
|
||||
DMG_NAME_SUFFIX=""
|
||||
# By default we build dev bundles.
|
||||
RELEASE_CHANNEL="dev"
|
||||
# Build the OSS bundle.
|
||||
RELEASE_CHANNEL="oss"
|
||||
FEATURES="release_bundle,cocoa_sentry,extern_plist"
|
||||
REGISTER_SERVICES=true
|
||||
DEBUG=false
|
||||
@@ -184,7 +184,7 @@ while (( "$#" )); do
|
||||
OPEN_AFTER_BUNDLE=true
|
||||
shift
|
||||
;;
|
||||
# Specify the release channel (local, dev, preview, stable, oss)
|
||||
# Specify the release channel (oss)
|
||||
-c|--channel)
|
||||
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
|
||||
RELEASE_CHANNEL=$2
|
||||
@@ -246,21 +246,10 @@ eval set -- "$PARAMS"
|
||||
# Infer a cargo profile from the bundle configuration.
|
||||
if [[ $DEBUG = true ]]; then
|
||||
CARGO_PROFILE="dev"
|
||||
elif [[ $RELEASE_CHANNEL = "local" || $RELEASE_CHANNEL = "dev" ]]; then
|
||||
# For dev bundles, we want to enable debug assertions to
|
||||
# catch violations that would otherwise silently pass in
|
||||
# a normal release build (e.g. in stable).
|
||||
if [[ "$ARTIFACT" == "cli" || "$ARTIFACT" == "galaxyctrl" ]]; then
|
||||
CARGO_PROFILE="release-cli-debug_assertions"
|
||||
else
|
||||
CARGO_PROFILE="release-lto-debug_assertions"
|
||||
fi
|
||||
elif [[ "$ARTIFACT" == "cli" || "$ARTIFACT" == "galaxyctrl" ]]; then
|
||||
CARGO_PROFILE="release-cli"
|
||||
else
|
||||
if [[ "$ARTIFACT" == "cli" || "$ARTIFACT" == "galaxyctrl" ]]; then
|
||||
CARGO_PROFILE="release-cli"
|
||||
else
|
||||
CARGO_PROFILE="release-lto"
|
||||
fi
|
||||
CARGO_PROFILE="release-lto"
|
||||
fi
|
||||
|
||||
TARGET_PROFILE_DIR="$CARGO_PROFILE"
|
||||
@@ -268,53 +257,13 @@ if [[ "$CARGO_PROFILE" == "dev" ]]; then
|
||||
TARGET_PROFILE_DIR="debug"
|
||||
fi
|
||||
|
||||
if [[ $RELEASE_CHANNEL = "local" ]]; then
|
||||
WARP_BIN="galaxy-local"
|
||||
BUNDLE_ID="com.samsung.Galaxy-Local"
|
||||
WARP_APP_NAME="Galaxy Local"
|
||||
WARP_SCHEME_NAME="galaxy"
|
||||
FEATURES="$FEATURES,agent_mode_debug"
|
||||
# For local builds, use different versions of our bundled frameworks (e.g.:
|
||||
# Sentry). This needs to be exported so it can be referenced by
|
||||
# app/build.rs later, while running `cargo bundle`.
|
||||
export FRAMEWORK_OVERRIDE="dev"
|
||||
elif [[ $RELEASE_CHANNEL = "dev" ]]; then
|
||||
WARP_BIN="galaxy-dev"
|
||||
BUNDLE_ID="com.samsung.Galaxy-Dev"
|
||||
WARP_APP_NAME="Galaxy Dev"
|
||||
WARP_SCHEME_NAME="galaxydev"
|
||||
FEATURES="$FEATURES,agent_mode_debug"
|
||||
# Enable heap usage tracking & profiling using jemalloc through pprof.
|
||||
FEATURES="$FEATURES,jemalloc_pprof,heap_usage_tracking"
|
||||
# For dev builds, use different versions of our bundled frameworks (e.g.:
|
||||
# Sentry). This needs to be exported so it can be referenced by
|
||||
# app/build.rs later, while running `cargo bundle`.
|
||||
export FRAMEWORK_OVERRIDE="dev"
|
||||
export HANDLE_MARKDOWN=1
|
||||
elif [[ $RELEASE_CHANNEL = "preview" ]]; then
|
||||
WARP_BIN="galaxy-preview"
|
||||
BUNDLE_ID="com.samsung.Galaxy-Preview"
|
||||
WARP_APP_NAME="Galaxy Preview"
|
||||
WARP_SCHEME_NAME="galaxypreview"
|
||||
FEATURES="$FEATURES,preview_channel"
|
||||
# Enable heap usage tracking & profiling using jemalloc through pprof.
|
||||
FEATURES="$FEATURES,jemalloc_pprof,heap_usage_tracking"
|
||||
elif [[ $RELEASE_CHANNEL = "stable" ]]; then
|
||||
WARP_BIN="stable"
|
||||
BUNDLE_ID="com.samsung.Galaxy"
|
||||
WARP_APP_NAME="Galaxy"
|
||||
WARP_SCHEME_NAME="galaxy"
|
||||
# Enable heap usage tracking & profiling using jemalloc through pprof.
|
||||
FEATURES="$FEATURES,jemalloc_pprof,heap_usage_tracking"
|
||||
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
|
||||
WARP_BIN="galaxy-oss"
|
||||
BUNDLE_ID="com.samsung.Galaxy"
|
||||
WARP_APP_NAME="Galaxy"
|
||||
WARP_SCHEME_NAME="galaxy"
|
||||
# The OSS channel does not ship Sentry, so drop the cocoa_sentry feature
|
||||
# (which would otherwise pull in the Sentry framework dependency).
|
||||
FEATURES="release_bundle,extern_plist"
|
||||
fi
|
||||
WARP_BIN="galaxy-oss"
|
||||
BUNDLE_ID="com.galaxy.GalaxyOss"
|
||||
WARP_APP_NAME="Galaxy"
|
||||
WARP_SCHEME_NAME="galaxyoss"
|
||||
# The OSS channel does not ship Sentry, so drop the cocoa_sentry feature
|
||||
# (which would otherwise pull in the Sentry framework dependency).
|
||||
FEATURES="release_bundle,extern_plist"
|
||||
|
||||
OUT_DIR="target/$TARGET_PROFILE_DIR/bundle/osx"
|
||||
DOCK_TILE_PLUGIN_NAME="GalaxyDockTilePlugin.docktileplugin"
|
||||
@@ -347,6 +296,11 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$RELEASE_CHANNEL" != "oss" ]]; then
|
||||
echo "Error: only the oss release channel is supported" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set artifact-specific configuration.
|
||||
if [[ "$ARTIFACT" == cli ]]; then
|
||||
UNIVERSAL_BINARY=false
|
||||
@@ -539,15 +493,8 @@ if [[ "$ARTIFACT" == "app" ]]; then
|
||||
"$WORKSPACE_ROOT_DIR/script/prepare_bundled_pprof" "$HELPERS_DIR"
|
||||
fi
|
||||
|
||||
# Determine CLI wrapper script path based on release channel. Each channel's
|
||||
# value here must match `Channel::cli_command_name` in the Rust source.
|
||||
if [[ $RELEASE_CHANNEL = "stable" ]]; then
|
||||
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai"
|
||||
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
|
||||
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai-oss"
|
||||
else
|
||||
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai-$RELEASE_CHANNEL"
|
||||
fi
|
||||
# Keep this name aligned with `Channel::cli_command_name` in the Rust source.
|
||||
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/galaxy-ai-oss"
|
||||
|
||||
echo "Creating Resources/bin directory and CLI wrapper script..."
|
||||
mkdir -p "$BUNDLED_RESOURCES_DIR/bin"
|
||||
@@ -565,14 +512,8 @@ EOF
|
||||
chmod +x "$CLI_SCRIPT_PATH"
|
||||
|
||||
if [[ ",$FEATURES," =~ ",galaxy_control_cli," ]]; then
|
||||
# Each value must match `Channel::galaxyctrl_command_name` in the Rust source.
|
||||
if [[ $RELEASE_CHANNEL = "stable" ]]; then
|
||||
GALAXYCTRL_COMMAND_NAME="galaxyctrl"
|
||||
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
|
||||
GALAXYCTRL_COMMAND_NAME="galaxyctrl-oss"
|
||||
else
|
||||
GALAXYCTRL_COMMAND_NAME="galaxyctrl-$RELEASE_CHANNEL"
|
||||
fi
|
||||
# Keep this name aligned with `Channel::galaxyctrl_command_name` in the Rust source.
|
||||
GALAXYCTRL_COMMAND_NAME="galaxyctrl-oss"
|
||||
GALAXYCTRL_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/$GALAXYCTRL_COMMAND_NAME"
|
||||
echo "Creating galaxyctrl wrapper script at $GALAXYCTRL_SCRIPT_PATH..."
|
||||
"$WORKSPACE_ROOT_DIR/script/macos/create_galaxyctrl_wrapper" \
|
||||
|
||||
Reference in New Issue
Block a user