forked from Demion/remotehwinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
18 lines (14 loc) · 897 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
rm -Recurse -Force "Zabbix Agent\user_scripts\hwinfo_api_server\"
rm -Recurse -Force "Zabbix Agent\hwinfo_api_server.zip"
rm -Recurse -Force .\build\
pyinstaller.exe --onefile hwinfo_api_server.py --distpath "Zabbix Agent\user_scripts\hwinfo_api_server" --add-data "api/templates;api/templates" --add-data "api/static;api/static" --add-data "api/third_party;api/third_party"
xcopy api\third_party\* "Zabbix Agent\user_scripts\hwinfo_api_server\api\third_party\*" /E/Y
xcopy tests\* "Zabbix Agent\user_scripts\hwinfo_api_server\tests\*" /E/Y
cp .\README.md "Zabbix Agent\user_scripts\hwinfo_api_server\README.md"
rm -Recurse -Force "Zabbix Agent\user_scripts\hwinfo_api_server\api\third_party\process_control.py"
rm -Recurse -Force .\build\
rm -Recurse -Force hwinfo_api_server.spec
# Install 7-ZIP and add to environment variables 7z
cd 'Zabbix Agent'
7z a -tzip 'hwinfo_api_server.zip'
cd ..