-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
release.bat
34 lines (27 loc) · 963 Bytes
/
release.bat
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
rem Building & compressing serve-d for release inside a virtual machine with Windows 8 or above
pushd %~dp0
@if not exist version.txt (
echo.
echo !-- Error: version.txt is missing :/
echo.
pause
popd
goto :eof
)
rem This will sync this repo with the folder %SystemDrive%\buildsd
robocopy . %SystemDrive%\buildsd /MIR /XA:SH /XD .* /XF .* /XF *.zip
pushd %SystemDrive%\buildsd
set /p Version=<version.txt
dub build --compiler=ldc2 --arch=x86
if exist windows del /S /Q windows
mkdir windows
copy serve-d.exe windows\serve-d.exe
copy libcurl.dll windows\libcurl.dll
copy libeay32.dll windows\libeay32.dll
copy ssleay32.dll windows\ssleay32.dll
if exist windows.zip del windows.zip
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('windows', 'windows.zip'); }"
popd
move %SystemDrive%\buildsd\windows.zip "serve-d_%Version%-windows.zip"
popd
pause