1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00

add release for freebsd

This commit is contained in:
v2ray 2016-07-27 16:56:32 +02:00
parent b7ff8b8e4c
commit 330abd126c
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
3 changed files with 17 additions and 1 deletions

View File

@ -31,6 +31,8 @@ deploy:
- "$GOPATH/bin/v2ray-linux-arm.zip" - "$GOPATH/bin/v2ray-linux-arm.zip"
- "$GOPATH/bin/v2ray-linux-arm64.zip" - "$GOPATH/bin/v2ray-linux-arm64.zip"
- "$GOPATH/bin/v2ray-linux-mips64.zip" - "$GOPATH/bin/v2ray-linux-mips64.zip"
- "$GOPATH/bin/v2ray-freebsd-64.zip"
- "$GOPATH/bin/v2ray-freebsd-32.zip"
- "$GOPATH/bin/metadata.txt" - "$GOPATH/bin/metadata.txt"
skip_cleanup: true skip_cleanup: true
on: on:

View File

@ -10,3 +10,5 @@ $GOPATH/bin/build --os=linux --arch=x64 --zip
$GOPATH/bin/build --os=linux --arch=arm --zip $GOPATH/bin/build --os=linux --arch=arm --zip
$GOPATH/bin/build --os=linux --arch=arm64 --zip $GOPATH/bin/build --os=linux --arch=arm64 --zip
$GOPATH/bin/build --os=linux --arch=mips64 --zip $GOPATH/bin/build --os=linux --arch=mips64 --zip
$GOPATH/bin/build --os=freebsd --arch=x86 --zip
$GOPATH/bin/build --os=freebsd --arch=amd64 --zip

View File

@ -10,6 +10,7 @@ const (
Windows = GoOS("windows") Windows = GoOS("windows")
MacOS = GoOS("darwin") MacOS = GoOS("darwin")
Linux = GoOS("linux") Linux = GoOS("linux")
FreeBSD = GoOS("freebsd")
UnknownOS = GoOS("unknown") UnknownOS = GoOS("unknown")
) )
@ -35,6 +36,9 @@ func parseOS(rawOS string) GoOS {
if osStr == "linux" || osStr == "debian" || osStr == "ubuntu" || osStr == "redhat" || osStr == "centos" { if osStr == "linux" || osStr == "debian" || osStr == "ubuntu" || osStr == "redhat" || osStr == "centos" {
return Linux return Linux
} }
if osStr == "freebsd" {
return FreeBSD
}
return UnknownOS return UnknownOS
} }
@ -83,7 +87,15 @@ func getSuffix(os GoOS, arch GoArch) string {
case Mips64: case Mips64:
suffix = "-linux-mips64" suffix = "-linux-mips64"
} }
case FreeBSD:
switch arch {
case X86:
suffix = "-freebsd-32"
case Amd64:
suffix = "-freebsd-64"
case Arm:
suffix = "-freebsd-arm"
}
} }
return suffix return suffix
} }