Skip to content

Commit 6a4a587

Browse files
committed
Update bundle scripts to support oss channel.
1 parent 033c70f commit 6a4a587

6 files changed

Lines changed: 44 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,9 @@ jobs:
654654
shell: bash
655655
run: |
656656
if ${{ matrix.os == 'wasm' }}; then
657-
./script/wasm/bundle --bin dev --nouniversal --check-only
657+
./script/wasm/bundle --bin oss --nouniversal --check-only
658658
else
659-
./script/bundle --bin dev --nouniversal --check-only
659+
./script/bundle --bin oss --nouniversal --check-only
660660
fi
661661
env:
662662
# Attach the GitHub auth token so that requests to the GitHub API

script/linux/bundle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,23 @@ elif [[ $RELEASE_CHANNEL = "stable" ]]; then
164164
WARP_BIN="stable"
165165
BINARY_NAME="warp"
166166
APP_NAME="Warp"
167+
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
168+
WARP_BIN="warp-oss"
169+
BINARY_NAME="warp-oss"
170+
APP_NAME="WarpOss"
171+
# The OSS channel does not ship Sentry, so drop the crash_reporting feature
172+
# (which would otherwise pull in the Sentry SDK as a dependency).
173+
FEATURES="release_bundle"
167174
fi
168175

169176
# Artifact-specific binary naming
170177
if [[ "$ARTIFACT" == "cli" ]]; then
171-
# For CLI artifacts, use oz instead of warp as the binary name
172-
BINARY_NAME="${BINARY_NAME/warp/oz}"
178+
# For CLI artifacts, use oz instead of warp as the binary name. The OSS
179+
# channel is an exception: its CLI command name is `warp-oss`, matching
180+
# `Channel::cli_command_name` in the Rust source.
181+
if [[ $RELEASE_CHANNEL != "oss" ]]; then
182+
BINARY_NAME="${BINARY_NAME/warp/oz}"
183+
fi
173184
fi
174185

175186
# Artifact-specific configuration

script/macos/bundle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ while (( "$#" )); do
184184
OPEN_AFTER_BUNDLE=true
185185
shift
186186
;;
187-
# Specify the release channel (local, dev, preview, stable)
187+
# Specify the release channel (local, dev, preview, stable, oss)
188188
-c|--channel)
189189
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
190190
RELEASE_CHANNEL=$2
@@ -296,6 +296,14 @@ elif [[ $RELEASE_CHANNEL = "stable" ]]; then
296296
BUNDLE_ID="dev.warp.Warp-Stable"
297297
WARP_APP_NAME="Warp"
298298
WARP_SCHEME_NAME="warp"
299+
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
300+
WARP_BIN="warp-oss"
301+
BUNDLE_ID="dev.warp.WarpOss"
302+
WARP_APP_NAME="WarpOss"
303+
WARP_SCHEME_NAME="warposs"
304+
# The OSS channel does not ship Sentry, so drop the cocoa_sentry feature
305+
# (which would otherwise pull in the Sentry framework dependency).
306+
FEATURES="release_bundle,extern_plist"
299307
fi
300308

301309
OUT_DIR="target/$TARGET_PROFILE_DIR/bundle/osx"
@@ -510,9 +518,12 @@ if [[ "$ARTIFACT" == "app" ]]; then
510518
"$WORKSPACE_ROOT_DIR/script/prepare_bundled_pprof" "$HELPERS_DIR"
511519
fi
512520

513-
# Determine CLI wrapper script path based on release channel
521+
# Determine CLI wrapper script path based on release channel. Each channel's
522+
# value here must match `Channel::cli_command_name` in the Rust source.
514523
if [[ $RELEASE_CHANNEL = "stable" ]]; then
515524
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/oz"
525+
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
526+
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/warp-oss"
516527
else
517528
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/oz-$RELEASE_CHANNEL"
518529
fi

script/wasm/bundle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ elif [[ $RELEASE_CHANNEL = "preview" ]]; then
126126
FEATURES="$FEATURES,preview_channel"
127127
elif [[ $RELEASE_CHANNEL = "stable" ]]; then
128128
WARP_BIN="stable"
129+
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
130+
WARP_BIN="warp-oss"
129131
fi
130132

131133
if [ -n "${FEATURES_OVERRIDE+x}" ]; then

script/windows/bundle.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Param (
99
[Alias('check-only')]
1010
[Switch]$CHECK_ONLY,
1111

12-
[ValidateSet('local', 'dev', 'preview', 'stable')]
12+
[ValidateSet('local', 'dev', 'preview', 'stable', 'oss')]
1313
[String]$CHANNEL = 'dev',
1414

1515
[Alias('release-tag')]
@@ -109,6 +109,13 @@ if ("$CHANNEL" -eq 'local') {
109109
$APP_NAME = 'Warp'
110110
# TODO(vorporeal): Remove this once we get tests passing with this default enabled.
111111
$FEATURES = "$FEATURES,nld_improvements"
112+
} elseif ("$CHANNEL" -eq 'oss') {
113+
$WARP_BIN = 'warp-oss'
114+
$BINARY_NAME = 'warp-oss.exe'
115+
$APP_NAME = 'WarpOss'
116+
# The OSS channel does not ship Sentry, so drop the crash_reporting feature
117+
# (which would otherwise pull in the Sentry SDK as a dependency).
118+
$FEATURES = 'release_bundle,gui,nld_improvements'
112119
}
113120

114121
$BINARY_PATH = "$CARGO_TARGET_OUTPUT_DIR\$BINARY_NAME"

script/windows/windows-installer.iss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
((ReleaseChannel == "preview") ? "Preview" : \
2929
((ReleaseChannel == "local") ? "Local" : \
3030
((ReleaseChannel == "integration") ? "Integration" : \
31-
"Unknown"))))
31+
((ReleaseChannel == "oss") ? "Oss" : \
32+
"Unknown")))))
3233
#define AppMutexName "Local\Warp" + ChannelPascalCase + "_SingleInstance"
3334

3435

@@ -226,9 +227,12 @@ begin
226227
if not DirExists(BinDir) then
227228
CreateDir(BinDir);
228229
229-
{ Determine the channel-specific script name. }
230+
{ Determine the channel-specific script name. These values must match
231+
`Channel::cli_command_name` in the Rust source. }
230232
#if ReleaseChannel == "stable"
231233
CmdScriptName := 'oz.cmd'
234+
#elif ReleaseChannel == "oss"
235+
CmdScriptName := 'warp-oss.cmd';
232236
#else
233237
CmdScriptName := 'oz-{#ReleaseChannel}.cmd';
234238
#endif

0 commit comments

Comments
 (0)