Skip to content

Commit 5a1fc12

Browse files
committed
Put it in the wrong place, oops
1 parent 684c7b7 commit 5a1fc12

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Package.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,12 @@ extension Array where Element == PackageDescription.CXXSetting {
479479
result.append(.define("SWT_TESTING_LIBRARY_COMMIT_HASH", to: #""\#(git.currentCommit)""#))
480480
if git.hasUncommittedChanges {
481481
result.append(.define("SWT_TESTING_LIBRARY_COMMIT_MODIFIED", to: "1"))
482-
} else if let gitHubSHA = Context.environment["GITHUB_SHA"] {
483-
// When building in GitHub Actions, the git command may fail to get us the
484-
// commit hash, so check if GitHub shared it with us instead.
485-
result.append(.define("SWT_TESTING_LIBRARY_COMMIT_HASH", to: #""\#(gitHubSHA)""#))
486482
}
483+
} else if let gitHubSHA = Context.environment["GITHUB_SHA"] {
484+
// When building in GitHub Actions, the git command may fail to get us the
485+
// commit hash, so check if GitHub shared it with us instead.
486+
result.append(.define("SWT_TESTING_LIBRARY_VERSION", to: "0"))
487+
result.append(.define("SWT_TESTING_LIBRARY_COMMIT_HASH", to: #""\#(gitHubSHA)""#))
487488
}
488489

489490
return result

0 commit comments

Comments
 (0)