diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 31ac89fc2..11c727809 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,9 +1,12 @@ name: Create and publish a Docker image on: - push: - tags: - - "*" + workflow_dispatch: + inputs: + ref: + description: 'Ref to build (branch, tag or SHA)' + required: false + default: 'master' env: REGISTRY: ghcr.io diff --git a/CHANGELOG.md b/CHANGELOG.md index 002b20921..5ce8317aa 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## [0.50.2](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.50.2) (2022-10-12) + +- Fixed `redundantImports` dropping `@_implementationOnly` or `@_exported` annotations +- Fixed `blankLineAfterImports` bug affecting `@_implementationOnly` or `@_exported` imports +- Fixed case where regex literals were incorrectly interpreted as division operators +- Fixed bug with `genericExtensions` and nested generics +- Fixed crash in `opaqueGenericParameters` rule + ## [0.50.1](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.50.1) (2022-10-05) - Fixed bug in `opaqueGenericParameters` where type constraint depended on another type parameter diff --git a/CommandLineTool/swiftformat b/CommandLineTool/swiftformat index 61b7b14d8..a714cd23e 100755 Binary files a/CommandLineTool/swiftformat and b/CommandLineTool/swiftformat differ diff --git a/Sources/Formatter.swift b/Sources/Formatter.swift index 60cf6e469..fb06354b5 100644 --- a/Sources/Formatter.swift +++ b/Sources/Formatter.swift @@ -2,7 +2,7 @@ // Formatter.swift // SwiftFormat // -// Version 0.50.1 +// Version 0.50.2 // // Created by Nick Lockwood on 12/08/2016. // Copyright 2016 Nick Lockwood @@ -627,16 +627,3 @@ extension String { return result } } - -// `Swift.Character.isUppercase` isn't available until Swift 5.0+ / Xcode 10.2+ -#if !swift(>=5.0) - extension Character { - var isUppercase: Bool { - String(self).uppercased() == String(self) - } - - var isWhitespace: Bool { - String(self).trimmingCharacters(in: .whitespacesAndNewlines).isEmpty - } - } -#endif diff --git a/Sources/SwiftFormat.swift b/Sources/SwiftFormat.swift index 02c2043b9..f28e4f04b 100644 --- a/Sources/SwiftFormat.swift +++ b/Sources/SwiftFormat.swift @@ -32,7 +32,7 @@ import Foundation /// The current SwiftFormat version -let swiftFormatVersion = "0.50.1" +let swiftFormatVersion = "0.50.2" public let version = swiftFormatVersion /// The standard SwiftFormat config file name diff --git a/Sources/Tokenizer.swift b/Sources/Tokenizer.swift index 123196994..1e224d279 100644 --- a/Sources/Tokenizer.swift +++ b/Sources/Tokenizer.swift @@ -2,7 +2,7 @@ // Tokenizer.swift // SwiftFormat // -// Version 0.50.1 +// Version 0.50.2 // // Created by Nick Lockwood on 11/08/2016. // Copyright 2016 Nick Lockwood diff --git a/SwiftFormat.podspec.json b/SwiftFormat.podspec.json index 6c883937c..707893d70 100644 --- a/SwiftFormat.podspec.json +++ b/SwiftFormat.podspec.json @@ -1,6 +1,6 @@ { "name": "SwiftFormat", - "version": "0.50.1", + "version": "0.50.2", "license": { "type": "MIT", "file": "LICENSE.md" @@ -10,7 +10,7 @@ "authors": "Nick Lockwood", "source": { "git": "https://github.com/nicklockwood/SwiftFormat.git", - "tag": "0.50.1" + "tag": "0.50.2" }, "default_subspecs": "Core", "subspecs": [ diff --git a/SwiftFormat.xcodeproj/project.pbxproj b/SwiftFormat.xcodeproj/project.pbxproj index c689bf735..32c463b2f 100644 --- a/SwiftFormat.xcodeproj/project.pbxproj +++ b/SwiftFormat.xcodeproj/project.pbxproj @@ -1086,7 +1086,7 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.50.1; + MARKETING_VERSION = 0.50.2; PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1115,7 +1115,7 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.50.1; + MARKETING_VERSION = 0.50.2; PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1216,7 +1216,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.1; + MARKETING_VERSION = 0.50.2; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode"; PRODUCT_NAME = "SwiftFormat for Xcode"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1247,7 +1247,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.1; + MARKETING_VERSION = 0.50.2; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode"; PRODUCT_NAME = "SwiftFormat for Xcode"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1275,7 +1275,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.1; + MARKETING_VERSION = 0.50.2; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension"; PRODUCT_NAME = SwiftFormat; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1305,7 +1305,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.1; + MARKETING_VERSION = 0.50.2; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension"; PRODUCT_NAME = SwiftFormat; PROVISIONING_PROFILE_SPECIFIER = "";