fix: fail action if json not generated (#1638)

This commit is contained in:
nyagami
2025-04-17 09:25:42 +07:00
committed by GitHub
parent 03ae15cfef
commit 32fccc7738
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -22,6 +22,13 @@ npm run clearMultisrc
npm run generate npm run generate
npx tsc --project tsconfig.production.json npx tsc --project tsconfig.production.json
npm run json npm run json
if (-not (Test-Path .dist) -or -not (Get-ChildItem -Path .dist -Force)) {
echo "=========="
echo "JSON files were not generated! See the error above and fix it!"
exit 1
}
git add -f public/static .dist .js/src/plugins total.svg git add -f public/static .dist .js/src/plugins total.svg
git commit -m "chore: Publish Plugins" git commit -m "chore: Publish Plugins"
git push -f origin $dist git push -f origin $dist
+7
View File
@@ -22,6 +22,13 @@ npm run clearMultisrc
npm run generate npm run generate
npx tsc --project tsconfig.production.json npx tsc --project tsconfig.production.json
npm run json npm run json
if [ ! -d ".dist" ] || [ -z "$(ls -A .dist)" ]; then
echo "=========="
echo "JSON files were not generated! See the error above and fix it!"
exit 1
fi
git add -f public/static .dist .js/src/plugins total.svg git add -f public/static .dist .js/src/plugins total.svg
git commit -m "chore: Publish Plugins" git commit -m "chore: Publish Plugins"
git push -f origin $dist git push -f origin $dist