Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mflknr committed Feb 21, 2024
2 parents 8b63259 + 45d19dc commit aa0780f
Show file tree
Hide file tree
Showing 31 changed files with 90 additions and 159 deletions.
26 changes: 0 additions & 26 deletions .codecov.yml

This file was deleted.

62 changes: 10 additions & 52 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,25 @@
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:
name: Build with Swift ${{ matrix.swift }} on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
swift: ["5.3", "5.4"]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Swift Environment for Ubuntu and macOS
uses: fwal/[email protected]
with:
swift-version: ${{ matrix.swift }}

- name: Checkout
uses: actions/checkout@v2

- 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"]
swift: ["5.7", "5.8", "5.9"]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Swift Environment
uses: fwal/setup-swift@v1.7.0
- uses: actions/checkout@v4
- uses: fwal/setup-swift@v1
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

- name: Test
uses: sersoft-gmbh/[email protected]
with:
project: SwiftVersionCompare.xcodeproj
scheme: SwiftVersionCompare-Package
action: test

- name: Deploy to Codecov
uses: codecov/codecov-action@v1

- run: swift --version
- run: swift build -v
- run: swift test -v
11 changes: 5 additions & 6 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Documentation
name: update documentation

on:
push:
Expand All @@ -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/[email protected]
with:
branch: documentation
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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.7", "5.8", "5.9"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: fwal/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}

- run: swift --version
- run: swift build -v
35 changes: 12 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Release
name: release

on:
push:
Expand All @@ -8,27 +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 }}"
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

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ fastlane/test_output

iOSInjectionProject/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

# vscode
.vscode/
8 changes: 4 additions & 4 deletions .jazzy.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,6 +12,6 @@ clean: true
min_acl: public
xcodebuild_arguments:
- -project
- SwiftVersionCompare.xcodeproj
- VersionCompare.xcodeproj
- -scheme
- SwiftVersionCompare-Package
- VersionCompare-Package
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,26 @@ 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

### Changed

- package name to `swift-version-compare` to be in line with community standards

### Removed

- [CocoaPods](https://cocoapods.org) support

## [1.2.0] - 2024-02-03

### 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

- generated .xcodeproj file
- codecov

## [1.1.0] - 2021-10-02

Expand Down
21 changes: 12 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// swift-tools-version:5.9
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftVersionCompare",
name: "swift-version-compare",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
Expand All @@ -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]
Expand Down
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +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)
[![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/[email protected]?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).

Expand All @@ -15,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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions SwiftVersionCompare.podspec

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit aa0780f

Please sign in to comment.