Files
gradle/build
T
Daz DeBoer 0ea104b0b8 Fix legacy caching module distribution for CI
The legacy caching bundle at sources/legacy-caching/dist/ was
gitignored by sources/.gitignore, so CI never included it. Fix by:
- Copying the bundle into sources/dist/legacy-caching/ during build
- Updating the loader path to resolve from dist/legacy-caching/
- Adding legacy module build steps to build-dist action and
  ci-update-dist workflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 13:28:18 -06:00

67 lines
1.3 KiB
Python
Executable File

#!/bin/bash
build_legacy_caching() {
echo "Building legacy caching module..."
cd sources/legacy-caching
npm clean-install
npm run build
cd ../..
# Copy legacy caching bundle into sources/dist so the CI bot picks it up
mkdir -p sources/dist/legacy-caching
cp sources/legacy-caching/dist/index.js sources/dist/legacy-caching/
}
cd sources
case "$1" in
all)
cd ..
build_legacy_caching
cd sources
npm run all
;;
act)
# Build and copy outputs to the dist directory
cd ..
build_legacy_caching
cd sources
npm run build
cd ..
cp -r sources/dist .
# Run act
$@
# Revert the changes to the dist directory
git checkout -- dist
;;
dist)
cd ..
build_legacy_caching
cd sources
npm clean-install
npm run build
cd ..
cp -r sources/dist .
;;
init-scripts)
cd test/init-scripts
./gradlew check
;;
install)
cd ..
build_legacy_caching
cd sources
npm clean-install
npm run build
;;
test)
shift
npm test -- $@
;;
*)
cd ..
build_legacy_caching
cd sources
npm run build
;;
esac