-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sun
committed
Apr 10, 2023
1 parent
3a224fa
commit 10419f9
Showing
1 changed file
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
@REM 请提前搭建好node.js环境和go环境 | ||
@REM 请将前端项目文件拉取到本目录中,并将项目文件夹重命名为web | ||
|
||
set filenameZip=li-calendar_windows.zip | ||
set filename=li-calendar.exe | ||
cd web | ||
call npm run build | ||
rd ..\assets\frontend | ||
xcopy .\dist\ ..\assets\frontend /s /i /y | ||
cd ..\ | ||
go-bindata-assetfs -o=assets/bindata.go -pkg=assets assets/... | ||
go build -o li-calendar.exe --ldflags="-X main.RunMode=release" main.go | ||
echo "li-calendar.exe compilation is complete!" | ||
go build -o %filename% --ldflags="-X main.RunMode=release" main.go | ||
|
||
|
||
REM 打包文件 | ||
powershell Compress-Archive %filename% %filenameZip% | ||
|
||
REM 删除原始文件 | ||
del %filename% | ||
|
||
REM 返回上一级目录,进入父文件夹 | ||
cd .. | ||
echo "%filenameZip% compilation is complete!" |