From 2c8a0f174bc63cc411eea370ac08c8567e998a48 Mon Sep 17 00:00:00 2001 From: manuel-lopez Date: Wed, 12 Jun 2024 10:29:59 -0700 Subject: [PATCH 1/5] Update SwiftFormat to v. 0.55-beta-1 --- Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 579c10c..a81784d 100644 --- a/Package.swift +++ b/Package.swift @@ -42,8 +42,8 @@ let package = Package( .binaryTarget( name: "SwiftFormat", - url: "https://github.com/calda/SwiftFormat/releases/download/0.54-beta-7/SwiftFormat.artifactbundle.zip", - checksum: "0cf117050e7838f545009bfe4a75dbda98cff737cb847a7d065a89683e9e890a"), + url: "https://github.com/calda/SwiftFormat/releases/download/0.55-beta-1/SwiftFormat.artifactbundle.zip", + checksum: "ec2a022fc3a010750190c1933bb9cfd10e69c294acacac584680e208d1df73c6"), .binaryTarget( name: "SwiftLintBinary", From 36b9789f8162adbc22c1eb729b66b7039931fdf6 Mon Sep 17 00:00:00 2001 From: manuel-lopez Date: Wed, 12 Jun 2024 10:32:40 -0700 Subject: [PATCH 2/5] Update rule names --- Sources/AirbnbSwiftFormatTool/airbnb.swiftformat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/AirbnbSwiftFormatTool/airbnb.swiftformat b/Sources/AirbnbSwiftFormatTool/airbnb.swiftformat index bcb274a..bdd47a6 100644 --- a/Sources/AirbnbSwiftFormatTool/airbnb.swiftformat +++ b/Sources/AirbnbSwiftFormatTool/airbnb.swiftformat @@ -100,7 +100,7 @@ --rules preferForLoop --rules conditionalAssignment --rules wrapMultilineConditionalAssignment ---rules blankLineAfterMultilineSwitchCase ---rules consistentSwitchStatementSpacing +--rules blankLineAfterSwitchCase +--rules consistentSwitchCaseSpacing --rules semicolons --rules propertyType From 77a154523633f2bc12439e01b5a053770e05a7cf Mon Sep 17 00:00:00 2001 From: manuel-lopez Date: Wed, 12 Jun 2024 11:06:04 -0700 Subject: [PATCH 3/5] Update to 0.55-beta-2 --- Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index a81784d..09012ba 100644 --- a/Package.swift +++ b/Package.swift @@ -42,8 +42,8 @@ let package = Package( .binaryTarget( name: "SwiftFormat", - url: "https://github.com/calda/SwiftFormat/releases/download/0.55-beta-1/SwiftFormat.artifactbundle.zip", - checksum: "ec2a022fc3a010750190c1933bb9cfd10e69c294acacac584680e208d1df73c6"), + url: "https://github.com/calda/SwiftFormat/releases/download/0.55-beta-2/SwiftFormat.artifactbundle.zip", + checksum: "f7ba281b879af7920e368144117269ba00abcc589b6d36f47ea0c21e62410a7c"), .binaryTarget( name: "SwiftLintBinary", From 62fccba95eb86c3d9781f04080e8d4528d67f4d6 Mon Sep 17 00:00:00 2001 From: Cal Stephens Date: Wed, 12 Jun 2024 11:16:34 -0700 Subject: [PATCH 4/5] Could it be case sensitive? --- Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 09012ba..f086696 100644 --- a/Package.swift +++ b/Package.swift @@ -22,7 +22,7 @@ let package = Package( ]), dependencies: [ "AirbnbSwiftFormatTool", - "SwiftFormat", + "swiftformat", "SwiftLintBinary", ]), @@ -41,7 +41,7 @@ let package = Package( dependencies: ["AirbnbSwiftFormatTool"]), .binaryTarget( - name: "SwiftFormat", + name: "swiftformat", url: "https://github.com/calda/SwiftFormat/releases/download/0.55-beta-2/SwiftFormat.artifactbundle.zip", checksum: "f7ba281b879af7920e368144117269ba00abcc589b6d36f47ea0c21e62410a7c"), From bea9212ca111904788c97e1112d5f321cc514abc Mon Sep 17 00:00:00 2001 From: Cal Stephens Date: Wed, 12 Jun 2024 11:19:23 -0700 Subject: [PATCH 5/5] Update 'bundle exec rake update:swiftformat' to use lowercase target name --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 72c096f..b5a05bf 100644 --- a/Rakefile +++ b/Rakefile @@ -40,12 +40,12 @@ namespace :update do updated_swift_format_reference = <<-EOS .binaryTarget( - name: "SwiftFormat", + name: "swiftformat", url: "https://github.com/calda/SwiftFormat/releases/download/#{latest_version_number}/SwiftFormat.artifactbundle.zip", checksum: "#{checksum.strip}"), EOS - regex = /[ ]*.binaryTarget\([\S\s]*name: "SwiftFormat"[\S\s]*?\),\s/ + regex = /[ ]*.binaryTarget\([\S\s]*name: "swiftformat"[\S\s]*?\),\s/ updated_package_manifest = package_manifest_content.gsub(regex, updated_swift_format_reference) File.open(package_manifest_path, "w") { |file| file.puts updated_package_manifest }