-
Notifications
You must be signed in to change notification settings - Fork 131
/
release.bat
40 lines (31 loc) · 873 Bytes
/
release.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
@ECHO OFF
ECHO This script will release a new version of the firmware, e.g. 1.0.0
SET /P new_version=Please enter the new version number: %=%
SET home_dir=%~dp0
SET release_folder=releases\%new_version%
IF NOT EXIST %release_folder% (
MKDIR %release_folder%
CD src\controller
CALL compile.bat || GOTO :error
CD %home_dir%
COPY .\src\controller\main.ihx %release_folder%\TSDZ2-v%new_version%.hex
CD src\display\KT-LCD3
CALL compile.bat || GOTO :error
CD %home_dir%
COPY .\src\display\KT-LCD3\main.ihx %release_folder%\KT-LCD3-v%new_version%.hex
ECHO:
ECHO Release %new_version% has been created in %home_dir%%release_folder%
ECHO:
GOTO :EOF
) ELSE (
ECHO:
ECHO Release %new_version% already exists!
ECHO:
)
:error
ECHO:
ECHO Failed with error code %errorlevel%.
PAUSE
ECHO:
EXIT /b %errorlevel%
@ECHO ON