Files
continue/scripts/install-dependencies.sh
Patrick Erichsen 0f582f2002 feat: restore enhanced build system and integrate parallel build script
This PR combines two improvements to the build system:

1. **Restore Enhanced Build System** (reverts PR #6811)
   - Restores commit SHA versioning for VS Code extensions
   - Brings back reusable GitHub Actions workflows
   - Re-enables monorepo build system with local file dependencies
   - Restores enhanced oneper utility with commit SHA support

2. **Integrate Parallel Build Script** (integrates PR #6821)
   - Replaces shell/PowerShell build scripts with JavaScript version
   - Implements parallel package building for 40% faster builds (20s → 12s)
   - Cross-platform compatibility using Node.js instead of platform-specific scripts
   - Enhanced error reporting and build status visibility

## Key Changes
-  Reusable GitHub Actions workflow for VS Code extension builds
-  Commit SHA versioning restored in extension package.json
-  Enhanced oneper utility with full commit SHA support
-  New `scripts/build-packages.js` with parallel execution
-  Removed platform-specific `build-packages.sh` and `build-packages.ps1`
-  Updated all workflows and tasks to use the new build script

## Performance Impact
Build time improvement: **20s → 12s** (40% faster) due to parallel execution

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 14:22:11 -07:00

70 lines
1.9 KiB
Bash
Executable File

#!/usr/bin/env bash
# This is used in a task in .vscode/tasks.json
# Start developing with:
# - Run Task -> Install Dependencies
# - Debug -> Extension
set -e
# Check if node version matches .nvmrc
if [ -f .nvmrc ]; then
required_node_version=$(cat .nvmrc)
current_node_version=$(node -v)
# Remove 'v' prefix from versions for comparison
required_version=${required_node_version#v}
current_version=${current_node_version#v}
if [ "$required_version" != "$current_version" ]; then
echo "⚠️ Warning: Your Node.js version ($current_node_version) does not match the required version ($required_node_version)"
echo "Please consider switching to the correct version using: nvm use"
if [ -t 0 ]; then
read -p "Press Enter to continue with installation anyway..."
else
echo "Continuing with installation anyway..."
fi
echo
fi
fi
echo "Installing root-level dependencies..."
npm install
echo "Building packages (fetch, openai-adapters, config-yaml)..."
node ./scripts/build-packages.js
echo "Installing Core extension dependencies..."
pushd core
## This flag is set because we pull down Chromium at runtime
export PUPPETEER_SKIP_DOWNLOAD='true'
npm install
npm link
popd
echo "Installing GUI extension dependencies..."
pushd gui
npm install
npm link @continuedev/core
npm run build
popd
# VSCode Extension (will also package GUI)
echo "Installing VSCode extension dependencies..."
pushd extensions/vscode
# This does way too many things inline but is the common denominator between many of the scripts
npm install
npm link @continuedev/core
# npm run prepackage # not required since npm run package has prescript of prepackage
npm run package
popd
echo "Installing binary dependencies..."
pushd binary
npm install
npm run build
popd
echo "Installing docs dependencies..."
pushd docs
npm install
popd