updated build scripts for empty features

This commit is contained in:
zonyitoo
2021-06-21 10:11:55 +08:00
parent 6583640d5f
commit 3743ffe1c3
6 changed files with 61 additions and 33 deletions

46
Cargo.lock generated
View File

@@ -331,7 +331,7 @@ checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8"
dependencies = [
"cfg-if",
"libc",
"redox_syscall 0.2.8",
"redox_syscall 0.2.9",
"winapi",
]
@@ -751,9 +751,9 @@ checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
[[package]]
name = "libmimalloc-sys"
version = "0.1.21"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2396cf99d2f58611cd69f0efeee4af3d2e2c7b61bed433515029163aa567e65c"
checksum = "1d1b8479c593dba88c2741fc50b92e13dbabbbe0bd504d979f244ccc1a5b1c01"
dependencies = [
"cc",
]
@@ -866,9 +866,9 @@ dependencies = [
[[package]]
name = "mimalloc"
version = "0.1.25"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e7c6b11afd1e5e689ac96b6d18b1fc763398fe3d7eed99e8773426bc2033dfb"
checksum = "fb74897ce508e6c49156fd1476fc5922cbc6e75183c65e399c765a09122e5130"
dependencies = [
"libmimalloc-sys",
]
@@ -995,9 +995,9 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
[[package]]
name = "openssl"
version = "0.10.34"
version = "0.10.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d7830286ad6a3973c0f1d9b73738f69c76b739301d0229c4b96501695cbe4c8"
checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885"
dependencies = [
"bitflags",
"cfg-if",
@@ -1015,9 +1015,9 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
[[package]]
name = "openssl-sys"
version = "0.9.63"
version = "0.9.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6b0d6fb7d80f877617dfcb014e605e2b5ab2fb0afdf27935219bb6bd984cb98"
checksum = "209efc2fe0e980c8849efacdb567f975a1c80245c4f6980d6f012733bfa851af"
dependencies = [
"autocfg",
"cc",
@@ -1055,7 +1055,7 @@ dependencies = [
"cfg-if",
"instant",
"libc",
"redox_syscall 0.2.8",
"redox_syscall 0.2.9",
"smallvec",
"winapi",
]
@@ -1246,9 +1246,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]]
name = "redox_syscall"
version = "0.2.8"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee"
dependencies = [
"bitflags",
]
@@ -1492,7 +1492,7 @@ dependencies = [
[[package]]
name = "shadowsocks"
version = "1.11.1"
version = "1.11.2"
dependencies = [
"arc-swap 1.3.0",
"async-trait",
@@ -1515,7 +1515,7 @@ dependencies = [
"serde_urlencoded",
"shadowsocks-crypto",
"socket2 0.4.0",
"spin 0.9.0",
"spin 0.9.1",
"thiserror",
"tokio",
"tokio-io-timeout",
@@ -1560,7 +1560,7 @@ dependencies = [
[[package]]
name = "shadowsocks-service"
version = "1.11.1"
version = "1.11.2"
dependencies = [
"async-trait",
"byte_string",
@@ -1589,7 +1589,7 @@ dependencies = [
"serde",
"shadowsocks",
"socket2 0.4.0",
"spin 0.9.0",
"spin 0.9.1",
"thiserror",
"tokio",
"tokio-native-tls",
@@ -1673,9 +1673,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
name = "spin"
version = "0.9.0"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b87bbf98cb81332a56c1ee8929845836f85e8ddd693157c30d76660196014478"
checksum = "f5fdd7196b4ae35a111c6dc97f9cc152ca3ea8ad744f7cb46a9f27b3ef8f2f54"
dependencies = [
"lock_api",
]
@@ -1721,7 +1721,7 @@ dependencies = [
"cfg-if",
"libc",
"rand",
"redox_syscall 0.2.8",
"redox_syscall 0.2.9",
"remove_dir_all",
"winapi",
]
@@ -1813,9 +1813,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "1.7.0"
version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c79ba603c337335df6ba6dd6afc38c38a7d5e1b0c871678439ea973cd62a118e"
checksum = "5fb2ed024293bb19f7a5dc54fe83bf86532a44c12a2bb8ba40d64a4509395ca2"
dependencies = [
"autocfg",
"bytes",
@@ -2135,9 +2135,9 @@ dependencies = [
[[package]]
name = "vcpkg"
version = "0.2.13"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "025ce40a007e1907e58d5bc1a594def78e5573bb0b1160bc389634e8f12e4faa"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "vec_map"

View File

@@ -25,9 +25,17 @@ HOST_TRIPLE=$(rustc -Vv | grep 'host:' | awk '{print $2}')
echo "Started build release ${VERSION} for ${HOST_TRIPLE} with features \"${BUILD_FEATURES}\"..."
if [[ "${BUILD_TARGET}" != "" ]]; then
cargo build --release --features "${BUILD_FEATURES}" --target "${BUILD_TARGET}"
if [[ "${BUILD_FEATURES}" != "" ]]; then
cargo build --release --features "${BUILD_FEATURES}" --target "${BUILD_TARGET}"
else
cargo build --release --target "${BUILD_TARGET}"
fi
else
cargo build --release --features "${BUILD_FEATURES}"
if [[ "${BUILD_FEATURES}" != "" ]]; then
cargo build --release --features "${BUILD_FEATURES}"
else
cargo build --release
fi
fi
if [[ "$?" != "0" ]]; then

View File

@@ -1,16 +1,29 @@
#!pwsh
<#
OpenSSL is already installed on windows-latest virtual environment.
If you need OpenSSL, consider install it by:
choco install openssl
#>
param(
[Parameter(HelpMessage = "extra features")]
[Alias('f')]
[string]$Features
)
$ErrorActionPreference = "Stop"
$TargetTriple = (rustc -Vv | Select-String -Pattern "host: (.*)" | ForEach-Object { $_.Matches.Value }).split()[-1]
Write-Host "Started building release for ${TargetTriple} ..."
cargo build --release
if ([string]::IsNullOrEmpty($Features)) {
cargo build --release
}
else {
cargo build --release --features "${Features}"
}
if (!$?) {
exit $LASTEXITCODE
}

View File

@@ -49,11 +49,18 @@ function build() {
TARGET_FEATURES+=" local-redir"
fi
echo "* Building ${TARGET} package ${VERSION} with features \"${TARGET_FEATURES}\" ..."
if [[ "${TARGET_FEATURES}" != "" ]]; then
echo "* Building ${TARGET} package ${VERSION} with features \"${TARGET_FEATURES}\" ..."
cross build --target "${TARGET}" \
--features "${TARGET_FEATURES}" \
--release
cross build --target "${TARGET}" \
--features "${TARGET_FEATURES}" \
--release
else
echo "* Building ${TARGET} package ${VERSION} ..."
cross build --target "${TARGET}" \
--release
fi
if [[ $? != "0" ]]; then
exit $?

View File

@@ -1,6 +1,6 @@
[package]
name = "shadowsocks-service"
version = "1.11.1"
version = "1.11.2"
authors = ["Shadowsocks Contributors"]
description = "shadowsocks is a fast tunnel proxy that helps you bypass firewalls."
repository = "https://github.com/shadowsocks/shadowsocks-rust"
@@ -108,7 +108,7 @@ regex = "1.4"
serde = { version = "1.0", features = ["derive"] }
json5 = "0.3"
shadowsocks = { version = "1.11.1", path = "../shadowsocks" }
shadowsocks = { version = "1.11.2", path = "../shadowsocks" }
# Just for the ioctl call macro
[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))'.dependencies]

View File

@@ -1,6 +1,6 @@
[package]
name = "shadowsocks"
version = "1.11.1"
version = "1.11.2"
authors = ["Shadowsocks Contributors"]
description = "shadowsocks is a fast tunnel proxy that helps you bypass firewalls."
repository = "https://github.com/shadowsocks/shadowsocks-rust"