-
Notifications
You must be signed in to change notification settings - Fork 13
/
build_robohelp_gh.bat
112 lines (97 loc) · 3.52 KB
/
build_robohelp_gh.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
@echo on
setlocal enabledelayedexpansion
rem experimental build
if "%WORKSPACE%" == "" set WORKSPACE=%GITHUB_WORKSPACE%
if "%BUILD_NUMBER%" == "" set BUILD_NUMBER=999
if "%SOURCE_BUILD_NUMBER%" == "" set SOURCE_BUILD_NUMBER=%BUILD_NUMBER%
if "%SOURCE_MAJOR_VERSION%" == "" set SOURCE_MAJOR_VERSION=1
if "%SOURCE_MINOR_VERSION%" == "" set SOURCE_MINOR_VERSION=0
if "%JOB_NAME%" == "" set JOB_NAME=GMS2_Manual
set BUILDTYPE=release
set BUILDPLATFORM="Any CPU"
set BUILDCLEAN=1
set BUILDBETA=%BUILDBETA%
set S3_BUCKET=%S3_BUCKET%
set ZIP_FILE=%ZIP_FILE%
set basedir=%~dp0
:check_options
if %LANGUAGE%==EN (
if "%BUILDBETA%"=="1" (
set robohelpPreset="GMS2 Manual Responsive HTML5 BETA"
) else (
set robohelpPreset="GMS2 Manual Responsive HTML5"
)
goto finish_options
) else if %LANGUAGE%==ES (
set robohelpPreset="GMS2 Manual Spanish"
goto finish_options
) else if %LANGUAGE%==FR (
set robohelpPreset="GMS2 Manual French"
goto finish_options
) else if %LANGUAGE%==DE (
set robohelpPreset="GMS2 Manual German"
goto finish_options
) else if %LANGUAGE%==RU (
set robohelpPreset="GMS2 Manual Russian"
goto finish_options
) else if %LANGUAGE%==PT-BR (
set robohelpPreset="GMS2 Manual Portuguese (Brazil)"
goto finish_options
) else if %LANGUAGE%==ZH (
set robohelpPreset="GMS2 Manual Chinese (Simplified)"
goto finish_options
) else if %LANGUAGE%==IT (
set robohelpPreset="GMS2 Manual Italian"
goto finish_options
) else if %LANGUAGE%==JA (
set robohelpPreset="GMS2 Manual Japanese"
goto finish_options
) else if %LANGUAGE%==PL (
set robohelpPreset="GMS2 Manual Polish"
goto finish_options
) else if %LANGUAGE%==KO (
set robohelpPreset="GMS2 Manual Korean"
goto finish_options
)else (
set DESTDIR=%1
goto finish_options
)
shift
goto check_options
:finish_options
if "%DESTDIR%" == "" set DESTDIR=%GITHUB_WORKSPACE%\output
rem Pulling Adobe Zip from S3
aws s3 cp %S3_BUCKET%/%ZIP_FILE% %ZIP_FILE%
7z x %ZIP_FILE% -o"%basedir%"
rem Pulling RobohelpTool from S3
aws s3 cp %S3_BUCKET%/RoboHelpTool.exe RoboHelpTool.exe
copy "RoboHelpTool.exe" "%basedir%"
set roboHelpTool="%basedir%Adobe_RoboHelp_2022\RoboHelp.exe"
set helpTagsTool="%basedir%RoboHelpTool.exe"
echo "%robohelpPreset%"
%roboHelpTool% --cl "%basedir%Manual\GMS2_Manual.rhpj" -o %robohelpPreset% -p "%DESTDIR%\RoboHelp"
if not exist "%DESTDIR%\RoboHelp" (
echo "RoboHelp Directory not found - RoboHelp Crashed?"
exit /b 1
)
rem output help tags files
%helpTagsTool% -s="%basedir%Manual\contents" -o="%DESTDIR%\RoboHelp"
rem append css fix to layout.css
type "%basedir%SupportFiles\layout_fix_append.css" >> "%DESTDIR%\RoboHelp\template\Charcoal_Grey\layout.css"
pushd %DESTDIR%\RoboHelp
if /i %robohelpPreset%=="GMS2 Manual Responsive HTML5 BETA" (
echo Branch is develop - Choose BETA
aws s3 cp helpdocs_keywords.json s3://manual-json-files/Beta/helpdocs_keywords.json
aws s3 cp helpdocs_tags.json s3://manual-json-files/Beta/helpdocs_tags.json
) else if /i %robohelpPreset%=="GMS2 Manual Responsive HTML5" (
echo Branch is Main - Choose Green
aws s3 cp helpdocs_keywords.json s3://manual-json-files/Green/helpdocs_keywords.json
aws s3 cp helpdocs_tags.json s3://manual-json-files/Green/helpdocs_tags.json
) else (
echo Branch is not develop or main - Choose LTS
aws s3 cp helpdocs_keywords.json s3://manual-json-files/LTS/helpdocs_keywords.json
aws s3 cp helpdocs_tags.json s3://manual-json-files/LTS/helpdocs_tags.json
)
@REM rem ************************************************** ZIP up the output
7z a YoYoStudioRoboHelp.zip . -r
popd