diff --git a/package.json b/package.json index 5b465e8..6e98c72 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aditama-labs/nest-autocrud", - "version": "0.5.3", + "version": "0.6.1", "description": "NestJS Auto CRUD Library", "author": "Supan Adit Pratama", "license": "MIT", diff --git a/scripts/windows/cleaner.bat b/scripts/windows/cleaner.bat new file mode 100644 index 0000000..1e9d1cb --- /dev/null +++ b/scripts/windows/cleaner.bat @@ -0,0 +1,15 @@ +@echo off + +echo Removing the plugins directory... +rmdir /s /q ".\plugins" +if exist ".\plugins" ( + echo Warning: Failed to remove the plugins directory. +) + +echo Removing the dist directory... +rmdir /s /q ".\dist" +if exist ".\dist" ( + echo Warning: Failed to remove the dist directory. +) + +echo Done removing directories. \ No newline at end of file diff --git a/scripts/windows/release.bat b/scripts/windows/release.bat new file mode 100644 index 0000000..f3c1f12 --- /dev/null +++ b/scripts/windows/release.bat @@ -0,0 +1,27 @@ +@echo off + +echo Running npm run build:libs +npm run build:libs + +echo Copying package.json to plugins +copy package.json .\plugins + +echo Copying README.md to plugins +copy README.md .\plugins + +echo Changing working directory to plugins +cd plugins + +echo Publishing... +npm publish + +echo Cleaning up... +cd .. +if exist ".\scripts\windows\cleaner.bat" ( + call .\scripts\windows\cleaner.bat +) else ( + echo Warning: Windows cleanup script not found. +) + +echo Done! +pause \ No newline at end of file