mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
add release for freebsd
This commit is contained in:
parent
b7ff8b8e4c
commit
330abd126c
@ -31,6 +31,8 @@ deploy:
|
||||
- "$GOPATH/bin/v2ray-linux-arm.zip"
|
||||
- "$GOPATH/bin/v2ray-linux-arm64.zip"
|
||||
- "$GOPATH/bin/v2ray-linux-mips64.zip"
|
||||
- "$GOPATH/bin/v2ray-freebsd-64.zip"
|
||||
- "$GOPATH/bin/v2ray-freebsd-32.zip"
|
||||
- "$GOPATH/bin/metadata.txt"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
|
@ -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=arm64 --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
|
@ -10,6 +10,7 @@ const (
|
||||
Windows = GoOS("windows")
|
||||
MacOS = GoOS("darwin")
|
||||
Linux = GoOS("linux")
|
||||
FreeBSD = GoOS("freebsd")
|
||||
UnknownOS = GoOS("unknown")
|
||||
)
|
||||
|
||||
@ -35,6 +36,9 @@ func parseOS(rawOS string) GoOS {
|
||||
if osStr == "linux" || osStr == "debian" || osStr == "ubuntu" || osStr == "redhat" || osStr == "centos" {
|
||||
return Linux
|
||||
}
|
||||
if osStr == "freebsd" {
|
||||
return FreeBSD
|
||||
}
|
||||
return UnknownOS
|
||||
}
|
||||
|
||||
@ -83,7 +87,15 @@ func getSuffix(os GoOS, arch GoArch) string {
|
||||
case 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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user