mirror of
https://github.com/gradle/actions
synced 2024-12-22 08:02:25 +00:00
0e27ea7e6c
- Avoid running `npm install` on every execution - Add a separate `install` task that runs `npm clean-install`
36 lines
638 B
Bash
Executable file
36 lines
638 B
Bash
Executable file
#!/bin/bash
|
|
|
|
cd sources
|
|
|
|
case "$1" in
|
|
all)
|
|
npm run all
|
|
;;
|
|
act)
|
|
# Build and copy outputs to the dist directory
|
|
npm run build
|
|
cd ..
|
|
cp -r sources/dist .
|
|
# Run act
|
|
$@
|
|
# Revert the changes to the dist directory
|
|
git checkout -- dist
|
|
;;
|
|
dist)
|
|
npm clean-install
|
|
npm run build
|
|
cd ..
|
|
cp -r sources/dist .
|
|
;;
|
|
init-scripts)
|
|
cd test/init-scripts
|
|
./gradlew check
|
|
;;
|
|
install)
|
|
npm clean-install
|
|
npm run build
|
|
;;
|
|
*)
|
|
npm run build
|
|
;;
|
|
esac
|