From 706d53489d9dbdcc4ea67155e064af9b6a55426b Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Mon, 5 Feb 2024 13:22:10 +0100 Subject: [PATCH 01/11] REMOVE codecov --- .codecov.yml | 26 -------------------------- README.md | 1 - 2 files changed, 27 deletions(-) delete mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index da6eabc..0000000 --- a/.codecov.yml +++ /dev/null @@ -1,26 +0,0 @@ -# For more configuration details: -# https://docs.codecov.io/docs/codecov-yaml -# Check if this file is valid by running in bash: -# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate -# Coverage configuration -# ---------------------- -coverage: -status: -patch: false -range: 70..90 # First number represents red, and second represents green - -# (default is 70..100) -round: down # up, down, or nearest -precision: 2 # Number of decimal places, between 0 and 5 - -# Ignoring Paths -# -------------- -# which folders/files to ignore -ignore: -- Tests/**/* - -# Pull request comments: -# ---------------------- -# Diff is the Coverage Diff of the pull request. -# Files are the files impacted by the pull request -comment: false diff --git a/README.md b/README.md index 0ec269b..fd951c3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmflknr%2FSwiftVersionCompare%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/mflknr/SwiftVersionCompare) [![swiftcomp](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmflknr%2FSwiftVersionCompare%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/mflknr/SwiftVersionCompare) [![build](https://github.com/mflknr/SwiftVersionCompare/workflows/build/badge.svg)](https://github.com/mflknr/SwiftVersionCompare/actions) -[![codecov](https://codecov.io/gh/mflknr/SwiftVersionCompare/branch/develop/graph/badge.svg?token=6EAG2J8DMU)](https://codecov.io/gh/mflknr/SwiftVersionCompare) [![doccov](https://mflknr.github.io/SwiftVersionCompare/badge.svg?sanitize=true)](https://mflknr.github.io/SwiftVersionCompare/) [![licence](https://img.shields.io/github/license/mflknr/SwiftVersionCompare)](https://github.com/mflknr/SwiftVersionCompare/blob/main/LICENSE) [![Twitter](https://img.shields.io/badge/twitter-@mflknr-blue.svg?style=flat)](https://twitter.com/mflknr) From 1bd0db73e8404c05d2735d7e90399f5ed2dc9198 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Mon, 5 Feb 2024 13:22:24 +0100 Subject: [PATCH 02/11] FIX workflows --- .github/workflows/checks.yml | 54 +++++++---------------------------- .github/workflows/nightly.yml | 28 ++++++++++++++++++ .github/workflows/release.yml | 1 + 3 files changed, 39 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index bff285b..d38cb14 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -11,57 +11,23 @@ jobs: name: Build with Swift ${{ matrix.swift }} on ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] - swift: ["5.3", "5.4"] + os: [ macos-latest ] + swift: ["5.3", "5.4", "5.5", "5.6", "5.7", "5.8", "5.9"] runs-on: ${{ matrix.os }} steps: - name: Setup Swift Environment for Ubuntu and macOS - uses: fwal/setup-swift@v1.7.0 + uses: fwal/setup-swift@v1 with: swift-version: ${{ matrix.swift }} + + - name: Swift Version + run: swift --version - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build - run: | - swift --version - swift build -v - - test: - name: Test with Swift ${{ matrix.swift }} - strategy: - matrix: - os: [ macos-latest ] - swift: ["5.3", "5.4"] - runs-on: ${{ matrix.os }} - steps: - - name: Setup Swift Environment - uses: fwal/setup-swift@v1.7.0 - with: - swift-version: ${{ matrix.swift }} - - - name: Checkout - uses: actions/checkout@v2 - - - name: Test - run: | - swift --version - swift test - - codecov: - name: Deploy to Codecov - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - + run: swift build -v + - name: Test - uses: sersoft-gmbh/xcodebuild-action@v1.4 - with: - project: SwiftVersionCompare.xcodeproj - scheme: SwiftVersionCompare-Package - action: test - - - name: Deploy to Codecov - uses: codecov/codecov-action@v1 + run: swift test -v \ No newline at end of file diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..a250a97 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,28 @@ +name: Check build and tests + +on: + schedule: + - cron: '30 5 * * *' + +jobs: + build: + name: Build with Swift ${{ matrix.swift }} on ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + swift: ["5.3", "5.4", "5.5", "5.6", "5.7", "5.8", "5.9"] + runs-on: ${{ matrix.os }} + steps: + - name: Setup Swift Environment for Ubuntu and macOS + uses: fwal/setup-swift@v1 + with: + swift-version: ${{ matrix.swift }} + + - name: Swift Version + run: swift --version + + - name: Checkout + uses: actions/checkout@v3 + + - name: Build + run: swift build -v \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f7db19..a87edb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,7 @@ jobs: uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" draft: true title: "[${{ steps.vars.outputs.tag }}] - ${{ steps.date.outputs.date }}" From b2c1227ff2140b2003e191d82553026bda131ca7 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Mon, 5 Feb 2024 13:26:34 +0100 Subject: [PATCH 03/11] FIX swift-tools version --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 840347d..18312fd 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription From 1ce3b5dfd2c42abacdb12a324dbbc07f19f547bc Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Mon, 5 Feb 2024 21:24:43 +0100 Subject: [PATCH 04/11] REMOVE support for swift 5.6 and lower --- .github/workflows/checks.yml | 5 +---- .github/workflows/nightly.yml | 5 +---- CHANGELOG.md | 1 + Package.swift | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d38cb14..dd04df1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,16 +12,13 @@ jobs: strategy: matrix: os: [ macos-latest ] - swift: ["5.3", "5.4", "5.5", "5.6", "5.7", "5.8", "5.9"] + swift: ["5.7", "5.8", "5.9"] runs-on: ${{ matrix.os }} steps: - name: Setup Swift Environment for Ubuntu and macOS uses: fwal/setup-swift@v1 with: swift-version: ${{ matrix.swift }} - - - name: Swift Version - run: swift --version - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a250a97..9607afa 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,16 +10,13 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - swift: ["5.3", "5.4", "5.5", "5.6", "5.7", "5.8", "5.9"] + swift: ["5.7", "5.8", "5.9"] runs-on: ${{ matrix.os }} steps: - name: Setup Swift Environment for Ubuntu and macOS uses: fwal/setup-swift@v1 with: swift-version: ${{ matrix.swift }} - - - name: Swift Version - run: swift --version - name: Checkout uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index f321786..f53cd11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - generated .xcodeproj file +- codecov ## [1.1.0] - 2021-10-02 diff --git a/Package.swift b/Package.swift index 18312fd..ffba34b 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.7 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription From b8785b1e439ffb70d87e63bbeaaeab3981959390 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Mon, 5 Feb 2024 21:25:47 +0100 Subject: [PATCH 05/11] CHANGE new swift version in podspec --- CHANGELOG.md | 2 +- SwiftVersionCompare.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f53cd11..cc75200 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- `swift-tools-version` to `5.9.2` for the package manifest and tools +- `swift-tools-version` to `5.7` for the package manifest and tools ### Removed diff --git a/SwiftVersionCompare.podspec b/SwiftVersionCompare.podspec index 5985e1e..b32fc5e 100644 --- a/SwiftVersionCompare.podspec +++ b/SwiftVersionCompare.podspec @@ -14,5 +14,5 @@ Pod::Spec.new do |s| s.watchos.deployment_target = '7.0' s.tvos.deployment_target = '13.0' - s.swift_versions = ['5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9'] + s.swift_versions = ['5.7', '5.8', '5.9'] end From 257c214d367f7beac49f0b7bf35e9b1db8265250 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Wed, 21 Feb 2024 19:31:57 +0100 Subject: [PATCH 06/11] REMOVE support for cocoapods --- CHANGELOG.md | 6 ++++++ SwiftVersionCompare.podspec | 18 ------------------ 2 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 SwiftVersionCompare.podspec diff --git a/CHANGELOG.md b/CHANGELOG.md index cc75200..8eb68bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 2.0.0 + +### Removed + +- [CocoaPods](https://cocoapods.org) support + ## [1.2.0] - 2024-02-03 ### Changed diff --git a/SwiftVersionCompare.podspec b/SwiftVersionCompare.podspec deleted file mode 100644 index b32fc5e..0000000 --- a/SwiftVersionCompare.podspec +++ /dev/null @@ -1,18 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'SwiftVersionCompare' - s.version = '1.2.0' - s.summary = 'Create and compare semantic versions in swift.' - s.homepage = 'https://github.com/mflknr/SwiftVersionCompare' - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.authors = { 'Marius Felkner' => 'mflknr@mail.de' } - s.documentation_url = 'https://mflknr.github.io/SwiftVersionCompare/' - s.source = { :git => 'https://github.com/mflknr/SwiftVersionCompare.git', :tag => s.version.to_s } - s.source_files = 'Sources/SwiftVersionCompare/**/*' - - s.ios.deployment_target = '13.0' - s.osx.deployment_target = '10.15' - s.watchos.deployment_target = '7.0' - s.tvos.deployment_target = '13.0' - - s.swift_versions = ['5.7', '5.8', '5.9'] -end From 635eff34dd84daad6dfc377a3169fd4b91c7f556 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Wed, 21 Feb 2024 19:32:24 +0100 Subject: [PATCH 07/11] REMOVE vscode folder from repo --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 79e3579..5cc6de7 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,6 @@ fastlane/test_output iOSInjectionProject/ .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata + +# vscode +.vscode/ From 855b689bb4d04a8fb5067ef776eab311b8a26442 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Wed, 21 Feb 2024 19:33:27 +0100 Subject: [PATCH 08/11] CHANGE repository and package name --- .jazzy.yml | 8 ++++---- Package.swift | 19 +++++++++++-------- .../Helper/Character+Extensions.swift | 0 .../Helper/String+Regex.swift | 0 .../Helper/VersionCompareResult.swift | 0 .../Helper/VersionValidationError.swift | 0 .../BuildMetaData+ExpressibleByLiteral.swift | 0 .../BuildMetaData/BuildMetaData.swift | 0 .../PrereleaseIdentifier+Equatable.swift | 0 ...leaseIdentifier+ExpressibleByLiteral.swift | 0 .../PrereleaseIdentifier.swift | 0 ...SemanticVersionComparable+Comparable.swift | 0 .../SemanticVersionComparable+Equatable.swift | 0 .../SemanticVersionComparable+Hashable.swift | 0 .../SemanticVersionComparable.swift | 0 .../Version+Bundle.swift | 0 .../Version+OS.swift | 0 .../Version+StringInitializer.swift | 0 .../Version.swift | 0 .../SemanticVersionComparableTests.swift | 4 ++-- .../VersionTests.swift | 4 ++-- .../XCTestManifests.swift | 0 22 files changed, 19 insertions(+), 16 deletions(-) rename Sources/{SwiftVersionCompare => VersionCompare}/Helper/Character+Extensions.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/Helper/String+Regex.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/Helper/VersionCompareResult.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/Helper/VersionValidationError.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/BuildMetaData/BuildMetaData+ExpressibleByLiteral.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/BuildMetaData/BuildMetaData.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+Equatable.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+ExpressibleByLiteral.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/SemanticVersionComparable+Comparable.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/SemanticVersionComparable+Equatable.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/SemanticVersionComparable+Hashable.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/SemanticVersionComparable/SemanticVersionComparable.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/Version+Bundle.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/Version+OS.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/Version+StringInitializer.swift (100%) rename Sources/{SwiftVersionCompare => VersionCompare}/Version.swift (100%) rename Tests/{SwiftVersionCompareTests => VersionCompareTests}/SemanticVersionComparableTests.swift (99%) rename Tests/{SwiftVersionCompareTests => VersionCompareTests}/VersionTests.swift (99%) rename Tests/{SwiftVersionCompareTests => VersionCompareTests}/XCTestManifests.swift (100%) diff --git a/.jazzy.yml b/.jazzy.yml index 35abf0e..88fc193 100644 --- a/.jazzy.yml +++ b/.jazzy.yml @@ -1,7 +1,7 @@ -module: SwiftVersionCompare +module: VersionCompare author: mflknr author_url: https://www.mflknr.de/ -github_url: https://github.com/mflknr/SwiftVersionCompare/ +github_url: https://github.com/mflknr/swift-version-compare/ readme: README.md skip_undocumented: true hide_documentation_coverage: false @@ -12,6 +12,6 @@ clean: true min_acl: public xcodebuild_arguments: - -project - - SwiftVersionCompare.xcodeproj + - VersionCompare.xcodeproj - -scheme - - SwiftVersionCompare-Package + - VersionCompare-Package diff --git a/Package.swift b/Package.swift index ffba34b..08f0886 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription let package = Package( - name: "SwiftVersionCompare", + name: "swift-version-compare", platforms: [ .iOS(.v13), .macOS(.v10_15), @@ -13,16 +13,19 @@ let package = Package( ], products: [ .library( - name: "SwiftVersionCompare", - targets: ["SwiftVersionCompare"]), + name: "VersionCompare", + targets: [ + "VersionCompare" + ] + ), ], targets: [ - .target( - name: "SwiftVersionCompare", - dependencies: []), + .target(name: "VersionCompare"), .testTarget( - name: "SwiftVersionCompareTests", - dependencies: ["SwiftVersionCompare"] + name: "VersionCompareTests", + dependencies: [ + "VersionCompare" + ] ), ], swiftLanguageVersions: [.v5] diff --git a/Sources/SwiftVersionCompare/Helper/Character+Extensions.swift b/Sources/VersionCompare/Helper/Character+Extensions.swift similarity index 100% rename from Sources/SwiftVersionCompare/Helper/Character+Extensions.swift rename to Sources/VersionCompare/Helper/Character+Extensions.swift diff --git a/Sources/SwiftVersionCompare/Helper/String+Regex.swift b/Sources/VersionCompare/Helper/String+Regex.swift similarity index 100% rename from Sources/SwiftVersionCompare/Helper/String+Regex.swift rename to Sources/VersionCompare/Helper/String+Regex.swift diff --git a/Sources/SwiftVersionCompare/Helper/VersionCompareResult.swift b/Sources/VersionCompare/Helper/VersionCompareResult.swift similarity index 100% rename from Sources/SwiftVersionCompare/Helper/VersionCompareResult.swift rename to Sources/VersionCompare/Helper/VersionCompareResult.swift diff --git a/Sources/SwiftVersionCompare/Helper/VersionValidationError.swift b/Sources/VersionCompare/Helper/VersionValidationError.swift similarity index 100% rename from Sources/SwiftVersionCompare/Helper/VersionValidationError.swift rename to Sources/VersionCompare/Helper/VersionValidationError.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/BuildMetaData/BuildMetaData+ExpressibleByLiteral.swift b/Sources/VersionCompare/SemanticVersionComparable/BuildMetaData/BuildMetaData+ExpressibleByLiteral.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/BuildMetaData/BuildMetaData+ExpressibleByLiteral.swift rename to Sources/VersionCompare/SemanticVersionComparable/BuildMetaData/BuildMetaData+ExpressibleByLiteral.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/BuildMetaData/BuildMetaData.swift b/Sources/VersionCompare/SemanticVersionComparable/BuildMetaData/BuildMetaData.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/BuildMetaData/BuildMetaData.swift rename to Sources/VersionCompare/SemanticVersionComparable/BuildMetaData/BuildMetaData.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+Equatable.swift b/Sources/VersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+Equatable.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+Equatable.swift rename to Sources/VersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+Equatable.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+ExpressibleByLiteral.swift b/Sources/VersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+ExpressibleByLiteral.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+ExpressibleByLiteral.swift rename to Sources/VersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier+ExpressibleByLiteral.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier.swift b/Sources/VersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier.swift rename to Sources/VersionCompare/SemanticVersionComparable/PrereleaseIdentifier/PrereleaseIdentifier.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/SemanticVersionComparable+Comparable.swift b/Sources/VersionCompare/SemanticVersionComparable/SemanticVersionComparable+Comparable.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/SemanticVersionComparable+Comparable.swift rename to Sources/VersionCompare/SemanticVersionComparable/SemanticVersionComparable+Comparable.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/SemanticVersionComparable+Equatable.swift b/Sources/VersionCompare/SemanticVersionComparable/SemanticVersionComparable+Equatable.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/SemanticVersionComparable+Equatable.swift rename to Sources/VersionCompare/SemanticVersionComparable/SemanticVersionComparable+Equatable.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/SemanticVersionComparable+Hashable.swift b/Sources/VersionCompare/SemanticVersionComparable/SemanticVersionComparable+Hashable.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/SemanticVersionComparable+Hashable.swift rename to Sources/VersionCompare/SemanticVersionComparable/SemanticVersionComparable+Hashable.swift diff --git a/Sources/SwiftVersionCompare/SemanticVersionComparable/SemanticVersionComparable.swift b/Sources/VersionCompare/SemanticVersionComparable/SemanticVersionComparable.swift similarity index 100% rename from Sources/SwiftVersionCompare/SemanticVersionComparable/SemanticVersionComparable.swift rename to Sources/VersionCompare/SemanticVersionComparable/SemanticVersionComparable.swift diff --git a/Sources/SwiftVersionCompare/Version+Bundle.swift b/Sources/VersionCompare/Version+Bundle.swift similarity index 100% rename from Sources/SwiftVersionCompare/Version+Bundle.swift rename to Sources/VersionCompare/Version+Bundle.swift diff --git a/Sources/SwiftVersionCompare/Version+OS.swift b/Sources/VersionCompare/Version+OS.swift similarity index 100% rename from Sources/SwiftVersionCompare/Version+OS.swift rename to Sources/VersionCompare/Version+OS.swift diff --git a/Sources/SwiftVersionCompare/Version+StringInitializer.swift b/Sources/VersionCompare/Version+StringInitializer.swift similarity index 100% rename from Sources/SwiftVersionCompare/Version+StringInitializer.swift rename to Sources/VersionCompare/Version+StringInitializer.swift diff --git a/Sources/SwiftVersionCompare/Version.swift b/Sources/VersionCompare/Version.swift similarity index 100% rename from Sources/SwiftVersionCompare/Version.swift rename to Sources/VersionCompare/Version.swift diff --git a/Tests/SwiftVersionCompareTests/SemanticVersionComparableTests.swift b/Tests/VersionCompareTests/SemanticVersionComparableTests.swift similarity index 99% rename from Tests/SwiftVersionCompareTests/SemanticVersionComparableTests.swift rename to Tests/VersionCompareTests/SemanticVersionComparableTests.swift index 96d770d..a80dbdc 100644 --- a/Tests/SwiftVersionCompareTests/SemanticVersionComparableTests.swift +++ b/Tests/VersionCompareTests/SemanticVersionComparableTests.swift @@ -1,12 +1,12 @@ // // SemanticVersionComparableTests.swift -// SwiftVersionCompareTests +// VersionCompareTests // // Created by Marius Felkner on 01.01.21. // import XCTest -@testable import SwiftVersionCompare +@testable import VersionCompare final class SemanticVersionComparableTests: XCTestCase { func testEqualOperator() throws { diff --git a/Tests/SwiftVersionCompareTests/VersionTests.swift b/Tests/VersionCompareTests/VersionTests.swift similarity index 99% rename from Tests/SwiftVersionCompareTests/VersionTests.swift rename to Tests/VersionCompareTests/VersionTests.swift index 2620341..513041f 100644 --- a/Tests/SwiftVersionCompareTests/VersionTests.swift +++ b/Tests/VersionCompareTests/VersionTests.swift @@ -1,12 +1,12 @@ // // SemanticVersionComparableTests.swift -// SwiftVersionCompareTests +// VersionCompareTests // // Created by Marius Felkner on 01.01.21. // import XCTest -@testable import SwiftVersionCompare +@testable import VersionCompare typealias ValidVersionStringLiteral = String typealias ExpectedVersionString = String diff --git a/Tests/SwiftVersionCompareTests/XCTestManifests.swift b/Tests/VersionCompareTests/XCTestManifests.swift similarity index 100% rename from Tests/SwiftVersionCompareTests/XCTestManifests.swift rename to Tests/VersionCompareTests/XCTestManifests.swift From bc3397166664bafa253c328bb89989c5564eee97 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Wed, 21 Feb 2024 19:36:49 +0100 Subject: [PATCH 09/11] CHANGE readme and changelog --- CHANGELOG.md | 4 ++++ README.md | 21 ++++++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eb68bc..1020d72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 2.0.0 +### Changed + +- package name to `swift-version-compare` to be in line with community standards + ### Removed - [CocoaPods](https://cocoapods.org) support diff --git a/README.md b/README.md index fd951c3..76a40d0 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ -# SwiftVersionCompare +# swift-version-compare -[![platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmflknr%2FSwiftVersionCompare%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/mflknr/SwiftVersionCompare) -[![swiftcomp](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmflknr%2FSwiftVersionCompare%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/mflknr/SwiftVersionCompare) -[![build](https://github.com/mflknr/SwiftVersionCompare/workflows/build/badge.svg)](https://github.com/mflknr/SwiftVersionCompare/actions) -[![doccov](https://mflknr.github.io/SwiftVersionCompare/badge.svg?sanitize=true)](https://mflknr.github.io/SwiftVersionCompare/) -[![licence](https://img.shields.io/github/license/mflknr/SwiftVersionCompare)](https://github.com/mflknr/SwiftVersionCompare/blob/main/LICENSE) -[![Twitter](https://img.shields.io/badge/twitter-@mflknr-blue.svg?style=flat)](https://twitter.com/mflknr) +[![build](https://github.com/mflknr/SwiftVersionCompare/workflows/build/badge.svg)](https://github.com/mflknr/swift-version-compare/actions) +[![doccov](https://mflknr.github.io/swift-version-compare/badge.svg?sanitize=true)](https://mflknr.github.io/swift-version-compare/) +[![licence](https://img.shields.io/github/license/mflknr/swift-version-compare)](https://github.com/mflknr/swift-version-compare/blob/main/LICENSE) A package introducing a `Version` object implementing the `SemanticVersionComparable` protocol for comparing versions conforming to [SemVer](https://semver.org). @@ -14,18 +11,12 @@ A package introducing a `Version` object implementing the `SemanticVersionCompa #### Swift Package Manager: ```swift -package(url: https://github.com/mflknr/SwiftVersionCompare.git", from: "1.1.0")) -``` - -#### CocoaPods - -```ruby -pod 'SwiftVersionCompare', '~> 1.1.0' +.package(url: https://github.com/mflknr/swift-version-compare.git", from: "2.0.0")) ``` # Usage -For detailed implementation information see [documentation](https://mflknr.github.io/SwiftVersionCompare/). +For detailed implementation information see [documentation](https://mflknr.github.io/swift-version-compare/). ```swift // use the version core identifier for initialization From fba8e941e608f527270c5b012bd05be6c0670c10 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Wed, 21 Feb 2024 19:37:09 +0100 Subject: [PATCH 10/11] CHANGE workflows --- .github/workflows/checks.yml | 22 +++++++----------- .github/workflows/documentation.yml | 11 ++++----- .github/workflows/nightly.yml | 10 +++----- .github/workflows/release.yml | 36 ++++++++++------------------- 4 files changed, 28 insertions(+), 51 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index dd04df1..b44c777 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,10 +1,10 @@ -name: Check build and tests +name: check build and tests on: push: - branches: [ develop ] + branches: [ develop, main ] pull_request: - branches: [ develop ] + branches: [ develop, main ] jobs: build: @@ -15,16 +15,10 @@ jobs: swift: ["5.7", "5.8", "5.9"] runs-on: ${{ matrix.os }} steps: - - name: Setup Swift Environment for Ubuntu and macOS - uses: fwal/setup-swift@v1 + - uses: actions/checkout@v4 + - uses: fwal/setup-swift@v1 with: swift-version: ${{ matrix.swift }} - - - name: Checkout - uses: actions/checkout@v3 - - - name: Build - run: swift build -v - - - name: Test - run: swift test -v \ No newline at end of file + + - run: swift build -v + - run: swift test -v \ No newline at end of file diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 2a6397c..2e4b037 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,4 +1,4 @@ -name: Update Documentation +name: update documentation on: push: @@ -8,15 +8,14 @@ jobs: document: runs-on: macos-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Generate Documentation - uses: sersoft-gmbh/swifty-docs-action@v1 + - name: generate docs + uses: sersoft-gmbh/swifty-docs-action@v3 with: output: docs - - name: Deploy to GitHub Pages branch + - name: deploy docs to github pages uses: JamesIves/github-pages-deploy-action@4.1.4 with: branch: documentation diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9607afa..7d1e1eb 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -13,13 +13,9 @@ jobs: swift: ["5.7", "5.8", "5.9"] runs-on: ${{ matrix.os }} steps: - - name: Setup Swift Environment for Ubuntu and macOS - uses: fwal/setup-swift@v1 + - uses: actions/checkout@v4 + - uses: fwal/setup-swift@v1 with: swift-version: ${{ matrix.swift }} - - name: Checkout - uses: actions/checkout@v3 - - - name: Build - run: swift build -v \ No newline at end of file + - run: swift build -v \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a87edb8..18cfe75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Create Release +name: release on: push: @@ -8,28 +8,16 @@ on: jobs: release: runs-on: macos-latest + permissions: + contents: write steps: - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: exit if not on main branch + if: endsWith(github.ref, 'main') == false + run: exit -1 - - name: Get current tag - id: vars - run: echo "::set-output name=tag::${GITHUB_REF#refs/*/}" - - - name: Release to GitHub - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" - draft: true - title: "[${{ steps.vars.outputs.tag }}] - ${{ steps.date.outputs.date }}" - - - name: Release to CocoaPods - run: | - gem install cocoapods - set -eo pipefail - pod lib lint --allow-warnings - pod trunk push --allow-warnings - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + - name: create release + uses: ncipollo/release-action@v1 + with: + draft: true + skipIfReleaseExists: true + From 45d19dc47cbb7d23b2004824dd1b97f03d0c8909 Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Wed, 21 Feb 2024 19:42:33 +0100 Subject: [PATCH 11/11] ADD swift version print to workflows --- .github/workflows/checks.yml | 3 ++- .github/workflows/nightly.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b44c777..ee736e9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -19,6 +19,7 @@ jobs: - uses: fwal/setup-swift@v1 with: swift-version: ${{ matrix.swift }} - + + - run: swift --version - run: swift build -v - run: swift test -v \ No newline at end of file diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7d1e1eb..eaf0495 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -18,4 +18,5 @@ jobs: with: swift-version: ${{ matrix.swift }} + - run: swift --version - run: swift build -v \ No newline at end of file