File tree 13 files changed +289
-78
lines changed
13 files changed +289
-78
lines changed Original file line number Diff line number Diff line change @@ -5,20 +5,31 @@ rm -f gen_*.go
5
5
rm -f tmpl_client/template_*
6
6
rm -f tmpl_client/tmpl_*
7
7
rm -f ./Gosora
8
+ rm -f ./common/gen_extend.go
8
9
9
10
echo "Building the router generator"
10
11
go build -ldflags="-s -w" -o RouterGen "./router_gen"
11
12
echo "Running the router generator"
12
13
./RouterGen
13
14
15
+ echo "Building the hook stub generator"
16
+ go build -ldflags="-s -w" -o HookStubGen "./cmd/hook_stub_gen"
17
+ echo "Running the hook stub generator"
18
+ ./HookStubGen
19
+
20
+ echo "Building the hook generator"
21
+ go build -tags hookgen -ldflags="-s -w" -o HookGen "./cmd/hook_gen"
22
+ echo "Running the hook generator"
23
+ ./HookGen
24
+
25
+ echo "Generating the JSON handlers"
26
+ easyjson -pkg common
27
+
14
28
echo "Building the query generator"
15
29
go build -ldflags="-s -w" -o QueryGen "./cmd/query_gen"
16
30
echo "Running the query generator"
17
31
./QueryGen
18
32
19
- echo "Generating the JSON handlers"
20
- easyjson -pkg common
21
-
22
33
echo "Building Gosora"
23
34
go generate
24
35
go build -ldflags="-s -w" -o Gosora
Original file line number Diff line number Diff line change @@ -5,32 +5,34 @@ rm -f gen_*.go
5
5
rm -f tmpl_client/template_*
6
6
rm -f tmpl_client/tmpl_*
7
7
rm -f ./Gosora
8
+ rm -f ./common/gen_extend.go
8
9
9
10
echo "Building the router generator"
10
- cd ./router_gen
11
- go build -ldflags="-s -w" -o RouterGen
12
- mv ./RouterGen ..
13
- cd ..
11
+ go build -ldflags="-s -w" -o RouterGen "./router_gen"
14
12
echo "Running the router generator"
15
13
./RouterGen
16
14
17
- echo "Building the query generator"
18
- cd ./cmd/query_gen
19
- go build -ldflags="-s -w" -o QueryGen
20
- mv ./QueryGen ../..
21
- cd ../..
22
- echo "Running the query generator"
23
- ./QueryGen
15
+ echo "Building the hook stub generator"
16
+ go build -ldflags="-s -w" -o HookStubGen "./cmd/hook_stub_gen"
17
+ echo "Running the hook stub generator"
18
+ ./HookStubGen
19
+
20
+ echo "Building the hook generator"
21
+ go build -tags hookgen -ldflags="-s -w" -o HookGen "./cmd/hook_gen"
22
+ echo "Running the hook generator"
23
+ ./HookGen
24
24
25
25
echo "Generating the JSON handlers"
26
26
easyjson -pkg common
27
27
28
+ echo "Building the query generator"
29
+ go build -ldflags="-s -w" -o QueryGen "./cmd/query_gen"
30
+ echo "Running the query generator"
31
+ ./QueryGen
32
+
28
33
echo "Building Gosora"
29
34
go generate
30
35
go build -ldflags="-s -w" -o Gosora -tags no_ws
31
36
32
37
echo "Building the installer"
33
- cd ./install
34
- go build -ldflags="-s -w" -o Installer
35
- mv ./Installer ..
36
- cd ..
38
+ go build -ldflags="-s -w" -o Installer "./install"
Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ rem TODO: Make these deletes a little less noisy
3
3
del " template_*.go"
4
4
del " tmpl_*.go"
5
5
del " gen_*.go"
6
- del " tmpl_client/template_*"
7
- del " tmpl_client/tmpl_*"
6
+ del " .\tmpl_client\template_*"
7
+ del " .\tmpl_client\tmpl_*"
8
+ del " .\common\gen_extend.go"
8
9
del " gosora.exe"
9
10
10
11
echo Generating the dynamic code
@@ -38,6 +39,20 @@ if %errorlevel% neq 0 (
38
39
exit /b %errorlevel%
39
40
)
40
41
42
+ echo Building the hook stub generator
43
+ go build -ldflags=" -s -w" " ./cmd/hook_stub_gen"
44
+ if %errorlevel% neq 0 (
45
+ pause
46
+ exit /b %errorlevel%
47
+ )
48
+
49
+ echo Building the hook generator
50
+ go build -tags hookgen -ldflags=" -s -w" " ./cmd/hook_gen"
51
+ if %errorlevel% neq 0 (
52
+ pause
53
+ exit /b %errorlevel%
54
+ )
55
+
41
56
echo Building the query generator
42
57
go build -ldflags=" -s -w" " ./cmd/query_gen"
43
58
if %errorlevel% neq 0 (
Original file line number Diff line number Diff line change @@ -3,10 +3,9 @@ rem TODO: Make these deletes a little less noisy
3
3
del " template_*.go"
4
4
del " tmpl_*.go"
5
5
del " gen_*.go"
6
- cd tmpl_client
7
- del " template_*"
8
- del " tmpl_*"
9
- cd ..
6
+ del " .\tmpl_client\template_*"
7
+ del " .\tmpl_client\tmpl_*"
8
+ del " .\common\gen_extend.go"
10
9
del " gosora.exe"
11
10
12
11
echo Generating the dynamic code
@@ -40,6 +39,20 @@ if %errorlevel% neq 0 (
40
39
exit /b %errorlevel%
41
40
)
42
41
42
+ echo Building the hook stub generator
43
+ go build -ldflags=" -s -w" " ./cmd/hook_stub_gen"
44
+ if %errorlevel% neq 0 (
45
+ pause
46
+ exit /b %errorlevel%
47
+ )
48
+
49
+ echo Building the hook generator
50
+ go build -tags hookgen -ldflags=" -s -w" " ./cmd/hook_gen"
51
+ if %errorlevel% neq 0 (
52
+ pause
53
+ exit /b %errorlevel%
54
+ )
55
+
43
56
echo Building the query generator
44
57
go build -ldflags=" -s -w" " ./cmd/query_gen"
45
58
if %errorlevel% neq 0 (
Original file line number Diff line number Diff line change @@ -151,6 +151,14 @@ go build -ldflags="-s -w" -o RouterGen "./router_gen"
151
151
152
152
./RouterGen
153
153
154
+ go build -ldflags=" -s -w" -o HookStubGen " ./cmd/hook_stub_gen"
155
+
156
+ ./HookStubGen
157
+
158
+ go build -ldflags=" -s -w" -o HookGen " ./cmd/hook_gen"
159
+
160
+ ./HookGen
161
+
154
162
go build -ldflags=" -s -w" -o QGen " ./cmd/query_gen"
155
163
156
164
./QGen
@@ -203,6 +211,14 @@ go build -ldflags="-s -w" "./router_gen"
203
211
204
212
router_gen.exe
205
213
214
+ go build -ldflags="-s -w" "./cmd/hook_stub_gen"
215
+
216
+ hook_stub_gen.exe
217
+
218
+ go build -ldflags="-s -w" "./cmd/hook_gen"
219
+
220
+ hook_gen.exe
221
+
206
222
easyjson -pkg common
207
223
208
224
go build -ldflags="-s -w" "./cmd/query_gen"
@@ -224,4 +240,6 @@ I'm looking into minimising the number of go gets for the advanced build and to
224
240
225
241
If systemd gives you no permission errors, then make sure you ` chown ` , ` chgrp ` and ` chmod ` the files and folders appropriately.
226
242
227
- You don't need ` -ldflags="-s -w" ` in any of the commands, however it will make compilation times faster.
243
+ You don't need ` -ldflags="-s -w" ` in any of the commands, however it will make compilation times faster.
244
+
245
+ Building and running HookGen is optional, but strips unneccesary hook indirects for plugins you don't use.
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ rm -f gen_*.go
5
5
rm -f tmpl_client/template_*
6
6
rm -f tmpl_client/tmpl_*
7
7
rm -f ./Gosora
8
+ rm -f ./common/gen_extend.go
8
9
9
10
echo "Generating the dynamic code"
10
11
go generate
@@ -17,14 +18,24 @@ go build -ldflags="-s -w" -o RouterGen "./router_gen"
17
18
echo "Running the router generator"
18
19
./RouterGen
19
20
21
+ echo "Building the hook stub generator"
22
+ go build -ldflags="-s -w" -o HookStubGen "./cmd/hook_stub_gen"
23
+ echo "Running the hook stub generator"
24
+ ./HookStubGen
25
+
26
+ echo "Building the hook generator"
27
+ go build -tags hookgen -ldflags="-s -w" -o HookGen "./cmd/hook_gen"
28
+ echo "Running the hook generator"
29
+ ./HookGen
30
+
31
+ echo "Building Gosora"
32
+ go build -ldflags="-s -w" -o Gosora
33
+
20
34
echo "Building the query generator"
21
35
go build -ldflags="-s -w" -o QueryGen "./cmd/query_gen"
22
36
echo "Running the query generator"
23
37
./QueryGen
24
38
25
- echo "Building Gosora"
26
- go build -ldflags="-s -w" -o Gosora
27
-
28
39
echo "Building the templates"
29
40
./Gosora -build-templates
30
41
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ rm -f gen_*.go
5
5
rm -f tmpl_client/template_*
6
6
rm -f tmpl_client/tmpl_*
7
7
rm -f ./Gosora
8
+ rm -f ./common/gen_extend.go
8
9
9
10
echo "Generating the dynamic code"
10
11
go generate
@@ -14,14 +15,24 @@ go build -ldflags="-s -w" -o RouterGen "./router_gen"
14
15
echo "Running the router generator"
15
16
./RouterGen
16
17
17
- echo "Building the query generator"
18
- go build -ldflags="-s -w" -o QueryGen "./cmd/query_gen"
19
- echo "Running the query generator"
20
- ./QueryGen
18
+ echo "Building the hook stub generator"
19
+ go build -ldflags="-s -w" -o HookStubGen "./cmd/hook_stub_gen"
20
+ echo "Running the hook stub generator"
21
+ ./HookStubGen
22
+
23
+ echo "Building the hook generator"
24
+ go build -tags hookgen -ldflags="-s -w" -o HookGen "./cmd/hook_gen"
25
+ echo "Running the hook generator"
26
+ ./HookGen
21
27
22
28
echo "Generating the JSON handlers"
23
29
easyjson -pkg common
24
30
31
+ echo "Building the query generator"
32
+ go build -ldflags="-s -w" -o QGen "./cmd/query_gen"
33
+ echo "Running the query generator"
34
+ ./QGen
35
+
25
36
echo "Building Gosora"
26
37
go build -ldflags="-s -w" -o Gosora
27
38
Original file line number Diff line number Diff line change @@ -5,29 +5,34 @@ rm -f gen_*.go
5
5
rm -f tmpl_client/template_*
6
6
rm -f tmpl_client/tmpl_*
7
7
rm -f ./Gosora
8
+ rm -f ./common/gen_extend.go
8
9
9
10
echo "Generating the dynamic code"
10
11
go generate
11
12
12
13
echo "Building the router generator"
13
- cd ./router_gen
14
- go build -ldflags="-s -w" -o RouterGen
15
- mv ./RouterGen ..
16
- cd ..
14
+ go build -ldflags="-s -w" -o RouterGen "./router_gen"
17
15
echo "Running the router generator"
18
16
./RouterGen
19
17
20
- echo "Building the query generator"
21
- cd ./cmd/query_gen
22
- go build -ldflags="-s -w" -o QueryGen
23
- mv ./QueryGen ../..
24
- cd ../..
25
- echo "Running the query generator"
26
- ./QueryGen
18
+ echo "Building the hook stub generator"
19
+ go build -ldflags="-s -w" -o HookStubGen "./cmd/hook_stub_gen"
20
+ echo "Running the hook stub generator"
21
+ ./HookStubGen
22
+
23
+ echo "Building the hook generator"
24
+ go build -tags hookgen -ldflags="-s -w" -o HookGen "./cmd/hook_gen"
25
+ echo "Running the hook generator"
26
+ ./HookGen
27
27
28
28
echo "Generating the JSON handlers"
29
29
easyjson -pkg common
30
30
31
+ echo "Building the query generator"
32
+ go build -ldflags="-s -w" -o QueryGen "./cmd/query_gen"
33
+ echo "Running the query generator"
34
+ ./QueryGen
35
+
31
36
echo "Building Gosora"
32
37
go build -ldflags="-s -w" -o Gosora -tags no_ws
33
38
Original file line number Diff line number Diff line change @@ -3,10 +3,9 @@ rem TODO: Make these deletes a little less noisy
3
3
del " template_*.go"
4
4
del " tmpl_*.go"
5
5
del " gen_*.go"
6
- cd tmpl_client
7
- del " template_*"
8
- del " tmpl_*"
9
- cd ..
6
+ del " .\tmpl_client\template_*"
7
+ del " .\tmpl_client\tmpl_*"
8
+ del " .\common\gen_extend.go"
10
9
del " gosora.exe"
11
10
12
11
echo Generating the dynamic code
@@ -29,6 +28,35 @@ if %errorlevel% neq 0 (
29
28
exit /b %errorlevel%
30
29
)
31
30
31
+ echo Building the hook stub generator
32
+ go build -ldflags=" -s -w" " ./cmd/hook_stub_gen"
33
+ if %errorlevel% neq 0 (
34
+ pause
35
+ exit /b %errorlevel%
36
+ )
37
+ echo Running the hook stub generator
38
+ hook_stub_gen.exe
39
+ if %errorlevel% neq 0 (
40
+ pause
41
+ exit /b %errorlevel%
42
+ )
43
+
44
+ echo Building the hook generator
45
+ go build -tags hookgen -ldflags=" -s -w" " ./cmd/hook_gen"
46
+ if %errorlevel% neq 0 (
47
+ pause
48
+ exit /b %errorlevel%
49
+ )
50
+ echo Running the hook generator
51
+ hook_gen.exe
52
+ if %errorlevel% neq 0 (
53
+ pause
54
+ exit /b %errorlevel%
55
+ )
56
+
57
+ echo Generating the JSON handlers
58
+ easyjson -pkg common
59
+
32
60
echo Building the query generator
33
61
go build -ldflags=" -s -w" " ./cmd/query_gen"
34
62
if %errorlevel% neq 0 (
@@ -42,9 +70,6 @@ if %errorlevel% neq 0 (
42
70
exit /b %errorlevel%
43
71
)
44
72
45
- echo Generating the JSON handlers
46
- easyjson -pkg common
47
-
48
73
echo Building the executable
49
74
go build -ldflags=" -s -w" -o gosora.exe -tags no_ws
50
75
if %errorlevel% neq 0 (
You can’t perform that action at this time.
0 commit comments