mirror of
https://github.com/gradle/actions.git
synced 2026-04-19 18:12:58 +08:00
e48bd1161b
Recover the pre-extraction caching code (from 7a4e0968~1) into a standalone module at sources/legacy-caching/. This module bundles @actions/cache@4.0.5 with the existing patch and adapts the old caching API to the current CacheService interface. The cache-service-loader now uses the legacy module by default and only loads the proprietary vendored module when the license is accepted. Both paths are wrapped in a LoggingCacheService that identifies which module is active in logs and the Job Summary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
64 lines
1.1 KiB
Python
Executable File
64 lines
1.1 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 ../..
|
|
}
|
|
|
|
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
|