Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dfed committed Nov 26, 2023
1 parent 0696aa9 commit 6256267
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Scripts/build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ guard CommandLine.arguments.count > 1 else {

let rawPlatforms = CommandLine.arguments[1].components(separatedBy: ",")

var isFirstRun = true
for rawPlatform in rawPlatforms {
guard let platform = Platform(rawValue: rawPlatform) else {
print("Received unknown platform type \(rawPlatform)")
Expand All @@ -180,7 +179,7 @@ for rawPlatform in rawPlatforms {
"-sdk", platform.sdk,
"-derivedDataPath", platform.derivedDataPath,
"-PBXBuildsContinueAfterErrors=0",
"OTHER_SWIFT_FLAGS=-warnings-as-errors",
"OTHER_SWIFT_FLAGS=-warnings-as-errors -D CI",
]

if !platform.destination.isEmpty {
Expand All @@ -197,5 +196,4 @@ for rawPlatform in rawPlatforms {
}

try execute(commandPath: "/usr/bin/xcodebuild", arguments: xcodeBuildArguments)
isFirstRun = false
}
6 changes: 6 additions & 0 deletions Sources/SafeDI/SafeDI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#if CI
// We don't set `-load-plugin-library` when building with xcodebuild, so we can't use the macros in CI.

#else

// TODO: Document macro.
@attached(member, names: named(`init`), named(build), named(getDependencies), arbitrary)
public macro builder(_ propertyName: StaticString) = #externalMacro(module: "SafeDIMacros", type: "BuilderMacro")
Expand All @@ -34,3 +39,4 @@ public macro constructed() = #externalMacro(module: "SafeDIMacros", type: "Const
@attached(member)
public macro singleton() = #externalMacro(module: "SafeDIMacros", type: "SingletonMacro")

#endif

0 comments on commit 6256267

Please sign in to comment.