-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultibuild.bat
More file actions
executable file
·32 lines (28 loc) · 997 Bytes
/
multibuild.bat
File metadata and controls
executable file
·32 lines (28 loc) · 997 Bytes
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
echo off
setlocal EnableDelayedExpansion
: Require version as argument
IF "%1"=="" (
echo Error: No version provided
goto done
)
set OUT_BASEDIR=artifacts_win
md %OUT_BASEDIR%
: TODO: extract version from config.zig
set VERSION=%1
echo BUILDING v%VERSION%
: TODO: Have Windows-builds use zip
for %%t in (x86_64-windows-gnu x86_64-linux-gnu x86_64-macos-gnu) do (
set TARGET=%%t
set TARGET_STRIPPED=!TARGET:-gnu=!
set TARGET_STRIPPED=!TARGET_STRIPPED:-musl=!
echo TARGET: !TARGET!
zig build -Dtarget=!TARGET! -Drelease-safe --prefix %OUT_BASEDIR%\!TARGET_STRIPPED!\
copy README.md %OUT_BASEDIR%\!TARGET_STRIPPED!\bin
copy LICENSE %OUT_BASEDIR%\!TARGET_STRIPPED!\bin
copy xbuild\libs\!TARGET_STRIPPED!\* %OUT_BASEDIR%\!TARGET_STRIPPED!\bin
cd %OUT_BASEDIR%\!TARGET_STRIPPED!\bin
tar cfz ..\sapt-v%VERSION%-!TARGET_STRIPPED!.tar.xz *
move ..\sapt-v%VERSION%-!TARGET_STRIPPED!.tar.xz ..\..\
cd ..\..\..
)
:done