-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add contract test #170
Add contract test #170
Conversation
d3d075e
to
f4a1025
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShellOut👍
range: NSRange.init(location: 0, length: content.count)) else { | ||
return content | ||
} | ||
let output = (content as NSString).replacingCharacters(in: match.range, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Info: String.replacingOccurrences has a built in regex option.
let expression = "\\.package\\(url:\\s*\\\".+xcproj.git\\\".+\\)"
let replacement = ".package(url: \"../..\", .revision(\"\(revision)\"))"
return content.replacingOccurrences(of: expression, with: replacement, options: .regularExpression, range: nil)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I didn't know this. I'll update it.
atomically: true, | ||
encoding: .utf8) | ||
print("> Building XcodeGen") | ||
try shellOut(to: "cd \(clonePath); swift build") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swift test
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, makes sense 👍
Nice one! |
f4a1025
to
c956d89
Compare
Resolves #111
Short description 📝
Changes in
xcproj
might break the integration from other projects. The purpose of this PR is to add a test that tests the contract with XcodeGen. This test can be a reference to test contract with other libraries in the future.Solution 📦
Test the contract between
xcproj
andxcodegen
cc @yonaskolbImplementation 👩💻👨💻
GIF
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)