-
Notifications
You must be signed in to change notification settings - Fork 145
/
Copy pathRELEASE.BAT
30 lines (26 loc) · 1.05 KB
/
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
@ECHO OFF
IF "%1"=="" GOTO USAGE
REM assume ran in root directory of kernel checkout, e.g. C:\fdos\source\kernel\
ECHO tag git with release version -
git tag -a -m "Tag kernel release %1" ke%1 HEAD
ECHO get a clean tree
if EXIST ..\SOURCE RMDIR /S /Q ..\SOURCE > NUL
::git clone -v --local --branch ke%1 . ..\SOURCE\ke%1\
git clone -v --recurse-submodules --local . ..\SOURCE\ke%1\
REM delete files to exclude
RD /S /Q ..\SOURCE\ke%1\.git > NUL
RD /S /Q ..\SOURCE\ke%1\.github > NUL
IF EXIST ..\SOURCE\ke%1\.git* DEL /Q ..\SOURCE\ke%1\.git* > NUL
IF EXIST ..\SOURCE\ke%1\*.yml DEL /Q ..\SOURCE\ke%1\*.yml > NUL
IF EXIST ..\SOURCE\ke%1\ci*.sh DEL /Q ..\SOURCE\ke%1\ci*.sh > NUL
IF EXIST ..\SOURCE\ke%1\docs\*.yml DEL /Q ..\SOURCE\ke%1\docs\*.yml > NUL
IF EXIST ..\SOURCE\ke%1\docs\CNAME DEL /Q ..\SOURCE\ke%1\docs\CNAME > NUL
::pause
ECHO %CD%
CALL MAKEPKGS.BAT %1 RELEASE
GOTO DONE
:USAGE
ECHO Tag and build release kernels - usage: RELEASE {VERSION} e.g. RELEASE 2039
:DONE
ECHO Please git push the tag to origin and upload the archives.
ECHO E.g. git push origin ke%1