diff --git a/host.ps1 b/host.ps1 index b3e0ed5..baacbec 100644 --- a/host.ps1 +++ b/host.ps1 @@ -22,6 +22,13 @@ npm run clearMultisrc npm run generate npx tsc --project tsconfig.production.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 commit -m "chore: Publish Plugins" git push -f origin $dist diff --git a/host.sh b/host.sh index 6a1426f..40323a5 100755 --- a/host.sh +++ b/host.sh @@ -22,6 +22,13 @@ npm run clearMultisrc npm run generate npx tsc --project tsconfig.production.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 commit -m "chore: Publish Plugins" git push -f origin $dist