Skip to content

Commit

Permalink
Merge pull request #921 from alexandre-pod/fix/make_spm_annotations_m…
Browse files Browse the repository at this point in the history
…atch_xcode

Update remote Swift packages annotations to match Xcode
  • Loading branch information
amorde committed Jan 28, 2024
2 parents 2328a50 + 2fcb3ad commit c1cd865
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions spec/project/object/swift_package_remote_reference_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c1cd865

Please sign in to comment.