File tree 3 files changed +25
-4
lines changed
3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ name: Build and Package
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - v2
5
+ branches : [ v2 ]
6
+ pull_request :
7
+ branches : [ v2 ]
7
8
8
9
jobs :
9
10
build :
Original file line number Diff line number Diff line change 5
5
ifeq ($(OS ) ,Windows_NT)
6
6
PYTHON = ".venv/Scripts/python.exe"
7
7
CP = xcopy /E /I /Y
8
- EXTRA_PYINSTALLER_FLAGS = ""
8
+ EXTRA_PYINSTALLER_FLAGS =
9
9
10
10
define find-functions
11
11
@powershell -Command "$$matches = Select-String -Path $(MAKEFILE_LIST ) -Pattern '# #'; foreach ($$match in $$matches) { if ($$match.Line -notmatch 'powershell|Select-String') { $$line = $$match.Line; $$line -replace '.*##', '' } }"
@@ -50,6 +50,19 @@ install: .venv/pyvenv.cfg frontend/node_modules
50
50
51
51
# # build - Build whole project to frontend/dist.
52
52
.PHONY : build
53
+ ifeq ($(OS ) , Windows_NT)
54
+ build : .venv/pyvenv.cfg frontend/node_modules
55
+ $(PYTHON ) -m PyInstaller -n tf2-gptcb --noconfirm --icon icon.ico -w $(EXTRA_PYINSTALLER_FLAGS ) main.py
56
+ $(CP ) cfg dist\t f2-gptcb/cfg
57
+ $(CP ) icon.png dist\t f2-gptcb
58
+ $(CP ) commands.yaml dist\t f2-gptcb
59
+ mkdir dist\t f2-gptcb/logs
60
+ $(CP ) prompts dist\t f2-gptcb\p rompts
61
+ $(CP ) schemas dist\t f2-gptcb\s chemas
62
+
63
+ cd frontend
64
+ npm run pack
65
+ else
53
66
build : .venv/pyvenv.cfg frontend/node_modules
54
67
$(PYTHON ) -m PyInstaller -n tf2-gptcb --noconfirm --icon icon.ico -w $(EXTRA_PYINSTALLER_FLAGS ) main.py
55
68
$(CP ) cfg dist/tf2-gptcb/cfg
@@ -61,6 +74,8 @@ build: .venv/pyvenv.cfg frontend/node_modules
61
74
62
75
cd frontend
63
76
npm run pack
77
+ endif
78
+
64
79
65
80
# # lint - Runs linters on src.
66
81
.PHONY : lint
Original file line number Diff line number Diff line change 22
22
"electron:dev" : " wait-on tcp:3000 && cross-env VITE_ENVIRONMENT=development electron ." ,
23
23
"electron:demo" : " wait-on tcp:3000 && cross-env VITE_ENVIRONMENT=demo electron ." ,
24
24
"build" : " cross-env VITE_APP_ELECTRON=true vite build" ,
25
- "pack" : " npm run build && electron-builder" ,
25
+ "pack" : " npm run build && electron-builder --publish never " ,
26
26
"test" : " vite test" ,
27
27
"eject" : " vite eject"
28
28
},
93
93
" zip"
94
94
]
95
95
},
96
+ "linux" : {
97
+ "target" : [
98
+ " zip"
99
+ ]
100
+ },
96
101
"extends" : null
97
102
},
98
103
"eslintConfig" : {
You can’t perform that action at this time.
0 commit comments