• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

gitリポジトリのurlを貼り付けるだけでアプリケーションのビルドを実行するアプリ。 macOS用


Commit MetaInfo

Révision4cdbaf87cbafa5a85bbe0ed83e99743806e4ee62 (tree)
l'heure2018-04-08 14:29:09
Auteurmasakih <masakih@user...>
Commitermasakih

Message de Log

Cartfile検索を厳格にした

Change Summary

Modification

--- a/AppBuilderWithGit/Carthage.swift
+++ b/AppBuilderWithGit/Carthage.swift
@@ -26,7 +26,7 @@ final class Carthage {
2626
2727 private var cartfileURL: URL? {
2828
29- return findFile(pattern: "Cartfile$", in: baseURL, depth: 2)
29+ return findFile(pattern: "^Cartfile$", in: baseURL, depth: 2)
3030 }
3131
3232 private var carthageURL: URL? {
--- a/AppBuilderWithGit/ProjectFinder.swift
+++ b/AppBuilderWithGit/ProjectFinder.swift
@@ -33,7 +33,7 @@ func findFile(pattern: String, in url: URL, depth: Int = 1) -> URL? {
3333 return nil
3434 }
3535
36- if let url = contents.lazy.filter({ $0.path.match(pattern) }).first {
36+ if let url = contents.lazy.filter({ $0.lastPathComponent.match(pattern) }).first {
3737
3838 return url
3939 }
--- a/AppBuilderWithGitTests/AppBuilderWithGitTests.swift
+++ b/AppBuilderWithGitTests/AppBuilderWithGitTests.swift
@@ -39,6 +39,12 @@ class AppBuilderWithGitTests: XCTestCase {
3939 XCTAssertFalse("Hoge.xcodeproj.copy".match("\\w*\\.xcodeproj$"))
4040
4141 XCTAssertFalse(".xcodeproj.copy".match("\\w*\\.xcodeproj$"))
42+
43+
44+ XCTAssertTrue("Cartfile".match("^Cartfile$"))
45+ XCTAssertFalse("hogeCartfile".match("^Cartfile$"))
46+ XCTAssertFalse("Cartfilehoge".match("^Cartfile$"))
47+
4248 }
4349
4450