-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
70 lines (64 loc) · 2.4 KB
/
build.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
setlocal enabledelayedexpansion
IF exist build/ (rmdir /s/q build)
mkdir build
for /f "delims=" %%x in (version) do set version=%%x
SET GOOS=linux
SET GOARCH=amd64
go build -o build/converttomp4
tar -C build -a -cf build/converttomp4-%version%-Linux-%GOARCH%.tar.gz converttomp4
set idx=0
for /f %%F in ('certutil -hashfile build/converttomp4-%version%-Linux-%GOARCH%.tar.gz SHA256') do (
set "out!idx!=%%F"
set /a idx += 1
)
echo converttomp4-%version%-Linux-%GOARCH%.tar.gz %out1% >> build/checksum.txt
SET GOARCH=arm64
go build -o build/converttomp4
tar -C build -a -cf build/converttomp4-%version%-Linux-%GOARCH%.tar.gz converttomp4
set idx=0
for /f %%F in ('certutil -hashfile build/converttomp4-%version%-Linux-%GOARCH%.tar.gz SHA256') do (
set "out!idx!=%%F"
set /a idx += 1
)
echo converttomp4-%version%-Linux-%GOARCH%.tar.gz %out1% >> build/checksum.txt
SET GOOS=windows
SET GOARCH=amd64
go build -o build/converttomp4.exe
tar -C build -a -cf build/converttomp4-%version%-Windows-%GOARCH%.zip converttomp4.exe
set idx=0
for /f %%F in ('certutil -hashfile build/converttomp4-%version%-Windows-%GOARCH%.zip SHA256') do (
set "out!idx!=%%F"
set /a idx += 1
)
echo converttomp4-%version%-Windows-%GOARCH%.zip %out1% >> build/checksum.txt
SET GOARCH=arm64
go build -o build/converttomp4.exe
tar -C build -a -cf build/converttomp4-%version%-Windows-%GOARCH%.zip converttomp4.exe
set idx=0
for /f %%F in ('certutil -hashfile build/converttomp4-%version%-Windows-%GOARCH%.zip SHA256') do (
set "out!idx!=%%F"
set /a idx += 1
)
echo converttomp4-%version%-Windows-%GOARCH%.zip %out1% >> build/checksum.txt
SET GOOS=darwin
SET GOARCH=amd64
go build -o build/converttomp4
tar -C build -a -cf build/converttomp4-%version%-macOS-%GOARCH%.tar.gz converttomp4
set idx=0
for /f %%F in ('certutil -hashfile build/converttomp4-%version%-macOS-%GOARCH%.tar.gz SHA256') do (
set "out!idx!=%%F"
set /a idx += 1
)
echo converttomp4-%version%-macOS-%GOARCH%.tar.gz %out1% >> build/checksum.txt
SET GOARCH=arm64
go build -o build/converttomp4
tar -C build -a -cf build/converttomp4-%version%-macOS-%GOARCH%.tar.gz converttomp4
set idx=0
for /f %%F in ('certutil -hashfile build/converttomp4-%version%-macOS-%GOARCH%.tar.gz SHA256') do (
set "out!idx!=%%F"
set /a idx += 1
)
echo converttomp4-%version%-macOS-%GOARCH%.tar.gz %out1% >> build/checksum.txt
rm build/converttomp4
rm build/converttomp4.exe