macOS에서도 무중단 배포 가능하도록 설정
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"clean": "rimraf dist",
|
"clean": "rimraf dist",
|
||||||
"build": "npm run clean && vite build",
|
"build": "npm run clean && vite build",
|
||||||
"deploy:nas": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$ErrorActionPreference='Stop'; $src='dist'; $dst='Z:\\\\docker\\\\webpage\\\\frontend\\\\'; if(!(Test-Path $src)){ throw 'dist not found. Run build first.' }; if(!(Test-Path $dst)){ throw 'NAS drive not found. Check Z: mapping.' }; robocopy $src $dst /MIR /R:1 /W:1 /E /NFL /NDL /NP; if($LASTEXITCODE -ge 8){ exit $LASTEXITCODE }\"",
|
"deploy:nas": "node -e 'const isWin = process.platform === \"win32\"; const src = \"dist\"; const dstWin = \"Z:\\\\docker\\\\webpage\\\\frontend\\\\\"; const dstMac = \"/Volumes/gahusb.synology.me/docker/webpage/frontend/\"; const dst = isWin ? dstWin : dstMac; const fs = require(\"fs\"); if (!fs.existsSync(src)) { console.error(\"dist not found. Run build first.\"); process.exit(1); } if (!fs.existsSync(dst)) { console.error(\"NAS path not found. Check mount: \" + dst); process.exit(1); } if (isWin) { const cmd = \"powershell -NoProfile -ExecutionPolicy Bypass -Command \\\"$ErrorActionPreference=\\\"Stop\\\"; $src=\\\"dist\\\"; $dst=\\\"Z:\\\\docker\\\\webpage\\\\frontend\\\\\\\"; if(!(Test-Path $src)){ throw \\\"dist not found. Run build first.\\\" }; if(!(Test-Path $dst)){ throw \\\"NAS drive not found. Check Z: mapping.\\\" }; robocopy $src $dst /MIR /R:1 /W:1 /E /NFL /NDL /NP; if($LASTEXITCODE -ge 8){ exit $LASTEXITCODE }\\\"\"; require(\"child_process\").execSync(cmd); } else { require(\"child_process\").execSync(\"rsync -av --delete --delete-delay --inplace dist/ \" + dst); }'",
|
||||||
"release:nas": "npm run build && npm run deploy:nas",
|
"release:nas": "npm run build && npm run deploy:nas",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
|
|||||||
Reference in New Issue
Block a user