diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f98f46c..92610cc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,9 @@ ##### Bug Fixes -* None. +* Update remote Swift packages annotations to match Xcode + [alexandre-pod](https://github.com/alexandre-pod) + [#921](https://github.com/CocoaPods/Xcodeproj/pull/921) ## 1.23.0 (2023-09-22) diff --git a/lib/xcodeproj/project/object/swift_package_remote_reference.rb b/lib/xcodeproj/project/object/swift_package_remote_reference.rb index 94c70e0d..abd6c3ae 100644 --- a/lib/xcodeproj/project/object/swift_package_remote_reference.rb +++ b/lib/xcodeproj/project/object/swift_package_remote_reference.rb @@ -18,7 +18,7 @@ class XCRemoteSwiftPackageReference < AbstractObject #--------------------------------------# def ascii_plist_annotation - " #{isa} \"#{File.basename(display_name)}\" " + " #{isa} \"#{File.basename(display_name,".git")}\" " end # @return [String] the name of the remote Swift package reference. diff --git a/spec/project/object/swift_package_remote_reference_spec.rb b/spec/project/object/swift_package_remote_reference_spec.rb index b5535dc0..a199c2d2 100644 --- a/spec/project/object/swift_package_remote_reference_spec.rb +++ b/spec/project/object/swift_package_remote_reference_spec.rb @@ -19,5 +19,10 @@ module ProjectSpecs @proxy.repositoryURL = 'github.com/swift/package' @proxy.ascii_plist_annotation.should == ' XCRemoteSwiftPackageReference "package" ' end + + it 'returns the ascii plist annotation without the .git extension of repositoryURL' do + @proxy.repositoryURL = 'github.com/swift/package.git' + @proxy.ascii_plist_annotation.should == ' XCRemoteSwiftPackageReference "package" ' + end end end