Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::This batchfile assumes that the server's C:/ drive is mounted as a network drive at Y:/ and you checked out the repository at C:/something. Modify as needed.
- del /f /s /q "Y:/wamp/www/"
- rmdir /s /q "Y:/wamp/www/"
- cd /D "Y:/wamp"
- mkdir www
- ::echo d | xcopy "C:/something/src/*" "Y:/wamp/www/" /e /s /f /y /d
- echo d | xcopy "C:/something/src/*" "Y:/wamp/www/" /v /f /g /s /e /y
- cd /D "Y:/wamp/www"
- rename "assets" "0"
- cd /D "0"
- rename "suitcase_general.png" "0.png"
- rename "code_font.woff2" "1.woff2"
- cd /D "Y:/wamp/www"
- powershell -Command "(gc "Y:/wamp/www/index.html") -replace 'assets/', '0/' | Out-File -encoding ASCII "index.html.optimized.0""
- del /f /s /q "index.html"
- powershell -Command "(gc "Y:/wamp/www/index.html.optimized.0") -replace 'suitcase_general.png', '0.png' | Out-File -encoding ASCII "index.html.optimized.1""
- del /f /s /q "index.html.optimized.0"
- rename "index.html.optimized.1" "index.html"
- powershell -Command "(gc "Y:/wamp/www/index.css") -replace 'assets/', '0/' | Out-File -encoding ASCII "index.css.optimized.0""
- del /f /s /q "index.css"
- powershell -Command "(gc "Y:/wamp/www/index.css.optimized.0") -replace 'code_font.woff2', '1.woff2' | Out-File -encoding ASCII "index.css.optimized.1""
- del /f /s /q "index.css.optimized.0"
- rename "index.css.optimized.1" "index.css"
- powershell -Command "(gc "Y:/wamp/www/index.js") -replace 'tishalongname', '_1' | Out-File -encoding ASCII "index.js.optimized.0""
- del /f /s /q "index.js"
- rename "index.js.optimized.0" "index.js"
- minify "index.html" > "index.html.minified"
- minify "index.css" > "index.css.minified"
- minify "index.js" > "index.js.minified"
- del /f /s /q "index.html"
- del /f /s /q "index.css"
- del /f /s /q "index.js"
- rename "index.html.minified" "index.html"
- rename "index.css.minified" "index.css"
- rename "index.js.minified" "index.js"
- del ".minify.json" /f /s /q
- cd /D "C:/something"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement