Accept Swift Crypto 5 final release (#319)

Motivation:

The final release of Swift Crypto 5 is now available, so we don't need
the `SWIFT_CERTIFICATES_ALLOW_SWIFT_CRYPTO_BETA` env flag anymore and we
can accept the version range `"3.12.3"..<"6.0.0"`

Modifications:

Remove the `SWIFT_CERTIFICATES_ALLOW_SWIFT_CRYPTO_BETA` env var logic
and accept Swift Crypto `"3.12.3"..<"6.0.0"`

Result:

Projects can require both the final release of Swift Crypto 5 and the
latest Swift Certificates release
This commit is contained in:
Francesco Paolo Severino authored and GitHub committed 2026-09-18 13:23:02 +00:00
1 parent c8aece90ea
commit 630b5f50f6
1 file changed
+2 -18
+2 -18
View File
@@ -74,25 +74,9 @@ let package = Package(
// we're building in the Swift.org CI system alongside other projects in the Swift toolchain and
// we can depend on local versions of our dependencies instead of fetching them remotely.
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
// If the `SWIFT_CERTIFICATES_ALLOW_SWIFT_CRYPTO_BETA` environment variable is set
// swift-certificates will accept swift-crypto beta releases as a dependency.
//
// Note: A beta release can only be used if other packages in the dependency tree
// that have a direct dependency on swift-crypto accept beta releases as well.
if ProcessInfo.processInfo.environment["SWIFT_CERTIFICATES_ALLOW_SWIFT_CRYPTO_BETA"] == nil {
package.dependencies += [
.package(url: "https://github.com/apple/swift-crypto.git", "3.12.3"..<"5.0.0")
]
} else {
print("Accepting beta versions of swift-crypto!")
package.dependencies += [
.package(url: "https://github.com/apple/swift-crypto.git", "3.12.3"..<"5.0.0-beta.max")
]
}
package.dependencies += [
.package(url: "https://github.com/apple/swift-asn1.git", from: "1.1.0")
.package(url: "https://github.com/apple/swift-crypto.git", "3.12.3"..<"6.0.0"),
.package(url: "https://github.com/apple/swift-asn1.git", from: "1.1.0"),
]
} else {
package.dependencies += [