1- // swift-tools-version: 5.9
1+ // swift-tools-version: 5.10
22// The swift-tools-version declares the minimum version of Swift required to build this package.
33
44import Foundation
@@ -18,10 +18,11 @@ func envEnable(_ key: String, default defaultValue: Bool = false) -> Bool {
1818}
1919
2020let isXcodeEnv = Context . environment [ " __CFBundleIdentifier " ] == " com.apple.dt.Xcode "
21+ let development = envEnable ( " OPENGRAPH_DEVELOPMENT " , default: false )
2122
2223var sharedSwiftSettings : [ SwiftSetting ] = [ ]
2324
24- let warningsAsErrorsCondition = envEnable ( " OPENGRAPH_WERROR " , default: isXcodeEnv)
25+ let warningsAsErrorsCondition = envEnable ( " OPENGRAPH_WERROR " , default: isXcodeEnv && development )
2526if warningsAsErrorsCondition {
2627 sharedSwiftSettings. append ( . unsafeFlags( [ " -warnings-as-errors " ] ) )
2728}
@@ -125,8 +126,7 @@ if attributeGraphCondition {
125126let swiftTestingCondition = envEnable ( " OPENGRAPH_SWIFT_TESTING " , default: true )
126127if swiftTestingCondition {
127128 package . dependencies. append (
128- // Fix it to be 0.3.0 before we bump to Swift 5.10
129- . package ( url: " https://github.com/apple/swift-testing " , exact: " 0.3.0 " )
129+ . package ( url: " https://github.com/apple/swift-testing " , exact: " 0.6.0 " )
130130 )
131131 openGraphTestTarget. dependencies. append (
132132 . product( name: " Testing " , package : " swift-testing " )
0 commit comments