-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec.bat
More file actions
37 lines (30 loc) · 833 Bytes
/
exec.bat
File metadata and controls
37 lines (30 loc) · 833 Bytes
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
@echo off
setlocal enabledelayedexpansion
SET VERSION=%1
SET COMMIT_MESSAGE=%2
:latest
if "!VERSION!"=="" (
SET VERSION=latest
)
SET SCRIPTS_DIR=%~dp0/docs/scripts/!VERSION!/
SET STYLES_DIR=%~dp0/docs/styles/!VERSION!/
if "!COMMIT_MESSAGE!"=="" (
echo you need to provide a commit message for this deployment
exit /b 0
)
REM GENERATE THE language-color.css content
REM extract_github_color.ps1
IF NOT EXIST "!SCRIPTS_DIR!" ( MKDIR "!SCRIPTS_DIR!")
IF NOT EXIST "!STYLES_DIR!" ( MKDIR "!STYLES_DIR!")
robocopy %~dp0/scripts !SCRIPTS_DIR! /MIR
robocopy %~dp0/styles !STYLES_DIR! /MIR
if not "!VERSION!"=="latest" (
if not "!VERSION!"=="none" (
SET VERSION=latest
goto:latest
)
)
echo pushing deploy: !COMMIT_MESSAGE!
git add .
git commit -m !COMMIT_MESSAGE!
git push origin master