mirror of
https://github.com/block/goose.git
synced 2026-07-03 14:15:10 +02:00
failed the script when bundle:default fails and cleanup "alpha" (#8580)
This commit is contained in:
@@ -140,14 +140,13 @@ run-ui-only:
|
||||
@echo "Running UI..."
|
||||
cd ui/desktop && pnpm install && pnpm run start-gui
|
||||
|
||||
debug-ui *alpha:
|
||||
@echo "🚀 Starting goose frontend in external backend mode{{ if alpha == "alpha" { " with alpha features enabled" } else { "" } }}"
|
||||
debug-ui:
|
||||
@echo "🚀 Starting goose frontend in external backend mode"
|
||||
cd ui/desktop && \
|
||||
export GOOSE_EXTERNAL_BACKEND=true && \
|
||||
export GOOSE_SERVER__SECRET_KEY="${GOOSE_SERVER__SECRET_KEY:-test}" && \
|
||||
{{ if alpha == "alpha" { "export ALPHA=true &&" } else { "" } }} \
|
||||
pnpm install && \
|
||||
pnpm run {{ if alpha == "alpha" { "start-alpha-gui" } else { "start-gui" } }}
|
||||
pnpm run start-gui
|
||||
|
||||
# Run UI with main process debugging enabled
|
||||
# To debug main process:
|
||||
@@ -173,12 +172,6 @@ package-ui:
|
||||
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist ui/desktop/out/Goose-darwin-arm64/Goose.app
|
||||
@echo "Done! Launch with: open ui/desktop/out/Goose-darwin-arm64/Goose.app"
|
||||
|
||||
# Run UI with alpha changes
|
||||
run-ui-alpha:
|
||||
@just release-binary
|
||||
@echo "Running UI with alpha features..."
|
||||
cd ui/desktop && pnpm install && ALPHA=true pnpm run start-alpha-gui
|
||||
|
||||
# Run UI with latest (Windows version)
|
||||
run-ui-windows:
|
||||
@just release-windows
|
||||
@@ -254,11 +247,6 @@ make-ui:
|
||||
@just release-binary
|
||||
cd ui/desktop && pnpm run bundle:default
|
||||
|
||||
# make GUI with latest binary and alpha features enabled
|
||||
make-ui-alpha:
|
||||
@just release-binary
|
||||
cd ui/desktop && pnpm run bundle:alpha
|
||||
|
||||
# make GUI with latest Windows binary
|
||||
make-ui-windows:
|
||||
@just release-windows
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
"start:test-error": "GOOSE_TEST_ERROR=true electron-forge start",
|
||||
"package": "pnpm run i18n:compile && electron-forge package",
|
||||
"make": "pnpm run i18n:compile && electron-forge make",
|
||||
"bundle:default": "node scripts/prepare-platform-binaries.js && pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
|
||||
"bundle:alpha": "ALPHA=true node scripts/prepare-platform-binaries.js && ALPHA=true pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_alpha.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
|
||||
"bundle:default": "node scripts/prepare-platform-binaries.js && pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}.zip\")",
|
||||
"bundle:intel": "node scripts/prepare-platform-binaries.js && pnpm run make --arch=x64 && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-x64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_intel_mac.zip\")",
|
||||
"debug": "echo 'run --remote-debugging-port=8315' && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && lldb \"out/${BUNDLE_NAME}-darwin-arm64/${BUNDLE_NAME}.app\"",
|
||||
"test-e2e": "pnpm run generate-api && playwright test",
|
||||
@@ -38,7 +37,6 @@
|
||||
"test:integration": "vitest run --config vitest.integration.config.ts",
|
||||
"test:integration:watch": "vitest --config vitest.integration.config.ts",
|
||||
"test:integration:debug": "DEBUG=1 vitest run --config vitest.integration.config.ts",
|
||||
"start-alpha-gui": "ALPHA=true pnpm run start-gui",
|
||||
"i18n:extract": "formatjs extract 'src/**/*.{ts,tsx}' --out-file src/i18n/messages/en.json --flatten && pnpm run i18n:compile",
|
||||
"i18n:check": "node scripts/i18n-check.js",
|
||||
"i18n:compile": "node scripts/i18n-compile.js"
|
||||
|
||||
@@ -3,10 +3,6 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/Tooltip';
|
||||
import { defineMessages, useIntl } from '../../i18n';
|
||||
|
||||
const i18n = defineMessages({
|
||||
alpha: {
|
||||
id: 'environmentBadge.alpha',
|
||||
defaultMessage: 'Alpha',
|
||||
},
|
||||
dev: {
|
||||
id: 'environmentBadge.dev',
|
||||
defaultMessage: 'Dev',
|
||||
@@ -19,18 +15,13 @@ interface EnvironmentBadgeProps {
|
||||
|
||||
const EnvironmentBadge: React.FC<EnvironmentBadgeProps> = ({ className = '' }) => {
|
||||
const intl = useIntl();
|
||||
const isAlpha = process.env.ALPHA;
|
||||
const isDevelopment = import.meta.env.DEV;
|
||||
|
||||
// Don't show badge in production
|
||||
if (!isDevelopment && !isAlpha) {
|
||||
if (!isDevelopment) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const tooltipText = isAlpha
|
||||
? intl.formatMessage(i18n.alpha)
|
||||
: intl.formatMessage(i18n.dev);
|
||||
const bgColor = isAlpha ? 'bg-purple-600' : 'bg-orange-400';
|
||||
const tooltipText = intl.formatMessage(i18n.dev);
|
||||
|
||||
return (
|
||||
<Tooltip>
|
||||
@@ -41,13 +32,13 @@ const EnvironmentBadge: React.FC<EnvironmentBadgeProps> = ({ className = '' }) =
|
||||
aria-label={tooltipText}
|
||||
>
|
||||
<div className="absolute -inset-1" />
|
||||
<div className={`${bgColor} w-2 h-2 rounded-full`} />
|
||||
<div className="bg-orange-400 w-2 h-2 rounded-full" />
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent
|
||||
side="bottom"
|
||||
className={bgColor}
|
||||
arrowClassName={isAlpha ? 'fill-purple-600 bg-purple-600' : 'fill-orange-400 bg-orange-400'}
|
||||
className="bg-orange-400"
|
||||
arrowClassName="fill-orange-400 bg-orange-400"
|
||||
>
|
||||
{tooltipText}
|
||||
</TooltipContent>
|
||||
|
||||
@@ -932,9 +932,6 @@
|
||||
"envVarsSection.variableName": {
|
||||
"defaultMessage": "Variable name"
|
||||
},
|
||||
"environmentBadge.alpha": {
|
||||
"defaultMessage": "Alpha"
|
||||
},
|
||||
"environmentBadge.dev": {
|
||||
"defaultMessage": "Dev"
|
||||
},
|
||||
|
||||
@@ -4,8 +4,6 @@ import tailwindcss from '@tailwindcss/vite';
|
||||
// https://vitejs.dev/config
|
||||
export default defineConfig({
|
||||
define: {
|
||||
// This replaces process.env.ALPHA with a literal at build time
|
||||
'process.env.ALPHA': JSON.stringify(process.env.ALPHA === 'true'),
|
||||
'process.env.GOOSE_TUNNEL': JSON.stringify(process.env.GOOSE_TUNNEL !== 'no' && process.env.GOOSE_TUNNEL !== 'none'),
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user