forked from Kyrodan/KeeAnywhere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cmd
47 lines (35 loc) · 1.15 KB
/
build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@echo off
set version=1.5.1
set zip="packages\7-Zip.CommandLine.9.20.0\tools\7za.exe"
set msbuildcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
if not exist %msbuildcmd% goto error
call %msbuildcmd%
:cleanup
if not exist build mkdir build
del /s /f /q build\*
if not exist build\bin mkdir build\bin
if not exist build\dist mkdir build\dist
:build
nuget.exe restore
msbuild KeeAnywhere.sln /p:Configuration=Release /t:Clean,Build /fl /flp:logfile=build\build.log
if %errorlevel% NEQ 0 goto error
:package
copy KeeAnywhere\bin\Release\KeeAnywhere.plgx build\dist\KeeAnywhere-%version%.plgx
xcopy KeeAnywhere\bin\Release\*.* build\bin
del build\bin\*.plgx build\bin\*.pdb build\bin\*.xml build\bin\*.config build\bin\KeePass.*
%zip% a -tzip build\dist\KeeAnywhere-%version%.zip .\build\bin\*
xcopy /s /i chocolatey build\chocolatey
xcopy KeeAnywhere\bin\Release\KeeAnywhere.plgx build\chocolatey\tools
choco pack build\chocolatey\keepass-plugin-keeanywhere.nuspec --version %version% --outputdirectory build\dist
:final
goto end
:error
echo !
echo !
echo !
echo Fehler im Buildvorgang
echo !
echo !
echo !
:end
pause