Skip to content

Commit

Permalink
增加批量打包agent的脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Dec 24, 2024
1 parent ff2f610 commit 8fda8a2
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions Tools/pack-agent.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
set base=..\Bin\Agent

del %base%\*.zip /f/q
del %base%\*.tar.gz /f/q

pushd %base%\net9.0
set name=staragent90
bash -c "tar -czf %name%.tar.gz -- *.exe *.dll *.runtimeconfig.json"
move %name%.tar.gz ..\
bash -c "zip -9 %name%.zip -- *.exe *.dll *.runtimeconfig.json"
move %name%.zip ..\
popd

pushd %base%\net8.0
set name=staragent80
bash -c "tar -czf %name%.tar.gz -- *.exe *.dll *.runtimeconfig.json"
move %name%.tar.gz ..\
bash -c "zip -9 %name%.zip -- *.exe *.dll *.runtimeconfig.json"
move %name%.zip ..\
popd

pushd %base%\net7.0
set name=staragent70
bash -c "tar -czf %name%.tar.gz -- *.exe *.dll *.runtimeconfig.json"
move %name%.tar.gz ..\
bash -c "zip -9 %name%.zip -- *.exe *.dll *.runtimeconfig.json"
move %name%.zip ..\
popd

pushd %base%\net6.0
set name=staragent60
bash -c "tar -czf %name%.tar.gz -- *.exe *.dll *.runtimeconfig.json"
move %name%.tar.gz ..\
bash -c "zip -9 %name%.zip -- *.exe *.dll *.runtimeconfig.json"
move %name%.zip ..\
popd

pushd %base%\net5.0
set name=staragent50
bash -c "tar -czf %name%.tar.gz -- *.exe *.dll *.runtimeconfig.json"
move %name%.tar.gz ..\
bash -c "zip -9 %name%.zip -- *.exe *.dll *.runtimeconfig.json"
move %name%.zip ..\
popd

pushd %base%\netcoreapp3.1
set name=staragent31
bash -c "tar -czf %name%.tar.gz -- *.exe *.dll *.runtimeconfig.json"
move %name%.tar.gz ..\
bash -c "zip -9 %name%.zip -- *.exe *.dll *.runtimeconfig.json"
move %name%.zip ..\
popd

pushd %base%\net461
set name=staragent461
bash -c "zip -9 %name%.zip -- *.exe *.dll StarAgent.exe.config"
move %name%.zip ..\
popd

pushd %base%\net45
set name=staragent45
bash -c "zip -9 %name%.zip -- *.exe *.dll StarAgent.exe.config"
move %name%.zip ..\
popd

0 comments on commit 8fda8a2

Please sign in to comment.