Skip to content

Commit 23bb23a

Browse files
authored
migrate from make to sake (#5)
1 parent 56a7685 commit 23bb23a

File tree

11 files changed

+517
-104
lines changed

11 files changed

+517
-104
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ jobs:
1212
- uses: swift-actions/setup-swift@v2
1313
with:
1414
swift-version: "5.10"
15+
- name: Prepare test build
16+
run: swift build
1517
- name: Run tests
16-
run: make test
18+
run: ./Tests/integration_tests.sh .build/debug/progressline

.sake.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
case_converting_strategy: toSnakeCase

Makefile

Lines changed: 0 additions & 102 deletions
This file was deleted.

SakeApp/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_Store
2+
/.build
3+
/.index-build
4+
/Packages
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/configuration/registries.json
8+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9+
.netrc

SakeApp/BrewCommands.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import Sake
2+
import SwiftShell
3+
4+
@CommandGroup
5+
struct BrewCommands {
6+
static var ensureGhInstalled: Command {
7+
Command(
8+
description: "Ensure gh is installed",
9+
skipIf: { _ in
10+
run("which", "gh").succeeded
11+
},
12+
run: { _ in
13+
try runAndPrint("brew", "install", "gh")
14+
}
15+
)
16+
}
17+
18+
static var ensureGitCliffInstalled: Command {
19+
Command(
20+
description: "Ensure git-cliff is installed",
21+
skipIf: { _ in
22+
run("which", "git-cliff").succeeded
23+
},
24+
run: { _ in
25+
try runAndPrint("brew", "install", "git-cliff")
26+
}
27+
)
28+
}
29+
}

SakeApp/Package.resolved

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SakeApp/Package.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// swift-tools-version: 5.10
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import CompilerPluginSupport
5+
import PackageDescription
6+
7+
let package = Package(
8+
name: "SakeApp",
9+
platforms: [.macOS(.v10_15)], // Required by SwiftSyntax for the macro feature in Sake
10+
products: [
11+
.executable(name: "SakeApp", targets: ["SakeApp"]),
12+
],
13+
dependencies: [
14+
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.0"),
15+
.package(url: "https://github.com/kattouf/Sake", from: "0.1.0"),
16+
.package(url: "https://github.com/kareman/SwiftShell", from: "5.1.0"),
17+
],
18+
targets: [
19+
.executableTarget(
20+
name: "SakeApp",
21+
dependencies: [
22+
.product(name: "ArgumentParser", package: "swift-argument-parser"),
23+
"Sake",
24+
"SwiftShell",
25+
],
26+
path: "."
27+
),
28+
]
29+
)

0 commit comments

Comments
 (0)