@@ -11,6 +11,8 @@ if /i "%1" == "docs" goto DOCS
11
11
if /i " %1 " == " deploy-docs" goto DEPLOY-DOCS
12
12
if /i " %1 " == " serve" goto SERVE
13
13
if /i " %1 " == " lint" goto LINT
14
+ if /i " %1 " == " release" goto RELEASE
15
+ if /i " %1 " == " branch" goto BRANCH
14
16
goto :usage
15
17
16
18
:INIT
@@ -43,6 +45,48 @@ goto :usage
43
45
flake8
44
46
goto :eof
45
47
48
+ :BRANCH
49
+ if " %2 " == " " goto :usage
50
+ git checkout -b %2
51
+ goto :eof
52
+
53
+ :RELEASE
54
+ if " %2 " == " " goto :usage
55
+ if not exist " messages/release-%2 .md" (
56
+ echo Missing release-%2 .md
57
+ exit /b 1
58
+ )
59
+ git checkout st3176 && git merge %2 --no-ff
60
+ if not errorlevel 0 (
61
+ echo Unable to merge %2 into st3176!
62
+ exit /b 1
63
+ )
64
+ git checkout master && git merge %2 --no-ff
65
+ if not errorlevel 0 (
66
+ echo Unable to merge %2 into master!
67
+ exit /b 1
68
+ )
69
+ echo Hit any key to push branches!
70
+ pause
71
+ call git push origin st3176
72
+ if not errorlevel 0 (
73
+ echo Failed to push st3176!
74
+ exit /b 1
75
+ )
76
+ call git push origin master
77
+ if not errorlevel 0 (
78
+ echo Failed to push master!
79
+ exit /b 1
80
+ )
81
+ echo Hit any key to publish release!
82
+ pause
83
+ : create release for ST3
84
+ gh release create --target st3176 -t " MarkdownEditing %2 (ST3176+)" -F " messages/release-%2 .md" " 3176-%2 "
85
+ : create release for ST3
86
+ gh release create --target master -t " MarkdownEditing %2 (ST4107+)" -F " messages/release-%2 .md" " 4107-%2 "
87
+ git fetch
88
+ goto :eof
89
+
46
90
:VENV
47
91
call .venv\scripts\activate.bat
48
92
if " %VIRTUAL_ENV% " neq " .venv" exit /b 1
@@ -51,11 +95,13 @@ goto :usage
51
95
:USAGE
52
96
echo USAGE:
53
97
echo .
54
- echo make ^ [init^ |docs^ |gh-pages^ |serve^ |lint^ ]
98
+ echo make ^ [init^ |docs^ |gh-pages^ |serve^ |lint^ |branch ^ |release ^ ]
55
99
echo .
56
- echo init -- setup .venv and install requirements.
57
- echo docs -- build documentation
58
- echo deploy-docs -- build documentation and publish on Github Pages
59
- echo serve -- build documentation and serve via development server
60
- echo lint -- run black, flake8 and pytest
100
+ echo init -- setup .venv and install requirements.
101
+ echo docs -- build documentation
102
+ echo deploy-docs -- build documentation and publish on Github Pages
103
+ echo serve -- build documentation and serve via development server
104
+ echo lint -- run black, flake8 and pytest
105
+ echo branch 3.0.0 -- prepare version branch
106
+ echo release 3.0.0 -- make a release
61
107
goto :eof
0 commit comments