Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
on:
release:
types: published
permissions:
contents: read

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v6
- uses: SwiftDocOrg/swift-doc@master
with:
module-name: Version
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ on:
paths:
- Sources/**
- Tests/**
- Package.swift
- Package@swift-*.swift
- .github/workflows/checks.yml
permissions:
contents: read

jobs:
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- run: swift --version
- run: swift test --parallel
23 changes: 19 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,41 @@ on:
paths:
- Sources/**
- Tests/**
- Package.swift
- Package@swift-*.swift
- .github/workflows/ci.yml
push:
branches: master
paths: .github/workflows/ci.yml
paths:
- Sources/**
- Tests/**
- Package.swift
- Package@swift-*.swift
- .github/workflows/ci.yml
schedule:
- cron: '3 3 * * 4' # 3:03 AM, every Thursday

concurrency:
group: ${{ github.head_ref || 'scheduled' }}
cancel-in-progress: true

permissions:
contents: read

jobs:
macOS:
runs-on: macos-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: mxcl/xcodebuild@v3
with:
code-coverage: true
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v5
with:
use_oidc: true

linux:
runs-on: ubuntu-latest
Expand All @@ -40,5 +55,5 @@ jobs:
container:
image: swift:${{ matrix.x.swift }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1 # needs old version due to node dependency
- run: swift ${{ matrix.x.action }}
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ should need merge any fixes.
[codecov]: https://codecov.io/gh/mxcl/Version
[Swift Package Manager]: https://github.com/apple/swift-tools-support-core/blob/main/Sources/TSCUtility/Version.swift

# Support mxcl

Hey there, I’m Max Howell. I’m a prolific producer of open source software and
probably you already use some of it (for example, I created [`brew`]). I work
full-time on open source and it’s hard; currently *I earn less than minimum
wage*. Please help me continue my work, I appreciate it 🙏🏻

<a href="https://www.patreon.com/mxcl">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>

[Other ways to say thanks](http://mxcl.dev/#donate).

[`brew`]: https://brew.sh

# Usage

```swift
Expand Down Expand Up @@ -82,10 +67,6 @@ SwiftPM:
package.append(.package(url: "https://github.com/mxcl/Version.git", from: "2.0.0"))
```

Carthage:

> Waiting on: [@Carthage#1945](https://github.com/Carthage/Carthage/pull/1945).

## Ranges

Ranges work as you expect, but there are caveats for prerelease identifiers,
Expand Down
6 changes: 3 additions & 3 deletions Sources/Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ extension Version: LosslessStringConvertible {
func identifiers(start: String.Index?, end: String.Index) -> [String] {
guard let start = start else { return [] }
let identifiers = string[string.index(after: start)..<end]
return identifiers.split(separator: ".").map(String.init(_:))
return identifiers.split(separator: ".").map { String($0) }
}

self.prereleaseIdentifiers = identifiers(
Expand Down Expand Up @@ -133,7 +133,7 @@ extension Version: LosslessStringConvertible {
func identifiers(start: String.Index?, end: String.Index) -> [String] {
guard let start = start else { return [] }
let identifiers = string[string.index(after: start)..<end]
return identifiers.split(separator: ".").map(String.init(_:))
return identifiers.split(separator: ".").map { String($0) }
}

self.prereleaseIdentifiers = identifiers(
Expand Down Expand Up @@ -187,7 +187,7 @@ public extension Version {

if let prereleaseStartIndex = prereleaseStartIndex {
let identifiers = string[string.index(after: prereleaseStartIndex)..<string.endIndex]
prereleaseIdentifiers = identifiers.split(separator: ".").map(String.init(_:))
prereleaseIdentifiers = identifiers.split(separator: ".").map { String($0) }
} else {
prereleaseIdentifiers = []
}
Expand Down
7 changes: 0 additions & 7 deletions tea.yaml

This file was deleted.

Loading