-
Notifications
You must be signed in to change notification settings - Fork 34
/
Deploy.bat
99 lines (81 loc) · 2.17 KB
/
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
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
:: This Source Code Form is subject to the terms of the Mozilla Public License,
:: v. 2.0. If a copy of the MPL was not distributed with this file, You can
:: obtain one at https://mozilla.org/MPL/2.0/
::
:: Copyright (C) 2024, Peter Johnson (gravatar.com/delphidabbler).
::
:: Deploy script for CodeSnip.
::
:: This script compiles release versions of the standard and portable editions
:: of CodeSnip and places them into two different zip files ready for release.
::
:: This script uses Embarcadero Make. Various other programs are required to
:: run Make. See Src/Makefile for details.
::
:: To use the script:
:: 1) Set the environment variables required for Make to succeed. See
:: Src/Makefile for details
:: 2) Change directory to that where this script is located.
:: 3) Run the script.
::
:: Usage:
:: Deploy <version>
:: where
:: <version> is the version number of the release, e.g. 0.5.3-beta or 1.2.0.
@echo off
setlocal
:: Check for required parameter
if "%1"=="" goto paramerror
:: Store parameter
set Version=%1
:: Store common make parameters
set CommonParams=-DVERSION=%Version%
:: Store standard edition make parameters
set StandardParams=%CommonParams%
:: Store portable edition make parameters
set PortableParams=-DPORTABLE %CommonParams%
:: Set command line
set MakeCmd=Make
set StandardMakeCmd=%MakeCmd% %StandardParams%
set PortableMakeCmd=%MakeCmd% %PortableParams%
echo ----------------------------------------------
echo Deploying CodeSnip Standard And Portable Builds
echo -----------------------------------------------
echo.
echo Standard edition Make command: %StandardMakeCmd%
echo Portable edition Make command: %PortableMakeCmd%
cd Src
echo.
echo.
echo.
echo =========================
echo Building Standard edition
echo =========================
echo.
echo.
%StandardMakeCmd%
echo.
echo.
echo.
echo =========================
echo Building Portable edition
echo =========================
echo.
echo.
%PortableMakeCmd%
echo.
echo.
echo.
echo ====================
echo Deployment completed
echo ====================
goto end
:: Error messages
:paramerror
echo.
echo ***ERROR: Please specify a version number as a parameter
echo.
goto end
:: End
:end
endlocal