-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.bat
44 lines (37 loc) · 856 Bytes
/
deploy.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo ==== STARTING ====
@echo.
@IF EXIST .\dist\ (
@echo ^=^=^> Remove dist folder:
@RMDIR /S .\dist
)
@REM ) ELSE (
@REM )
@echo.
@echo ^=^=^> Building app:
@call npm run build
@echo.
@echo ^=^=^> Copying not scanned files:
XCOPY /v .\CNAME .\dist
XCOPY /v .\LICENSE .\dist
XCOPY /v .\README.md .\dist
XCOPY /v .\Makefile .\dist
XCOPY /v .\deploy.bat .\dist
@echo.
@echo ^=^=^> Checkout master branch:
@call git checkout master
@echo.
@echo ^=^=^> Apply dist and clean unwanted files and folders:
@RMDIR /S /Q .\css
@RMDIR /S /Q .\img
@RMDIR /S /Q .\js
@DEL /S /Q .\precache-manifest.*
XCOPY /s /v /h /y .\dist\* .\
@RMDIR /S /Q .\dist
@echo.
@echo ^=^=^> Commit changes to master:
@call git add .
@call git commit -m ":rocket: deploy website"
@call git push origin master
@echo.
@echo ^=^=^> Go back to develop:
@call git checkout develop