Skip to content

Commit

Permalink
migrate from make to sake (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
kattouf authored Nov 17, 2024
1 parent 56a7685 commit 23bb23a
Show file tree
Hide file tree
Showing 11 changed files with 517 additions and 104 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ jobs:
- uses: swift-actions/setup-swift@v2
with:
swift-version: "5.10"
- name: Prepare test build
run: swift build
- name: Run tests
run: make test
run: ./Tests/integration_tests.sh .build/debug/progressline
1 change: 1 addition & 0 deletions .sake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
case_converting_strategy: toSnakeCase
102 changes: 0 additions & 102 deletions Makefile

This file was deleted.

9 changes: 9 additions & 0 deletions SakeApp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
/.build
/.index-build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
29 changes: 29 additions & 0 deletions SakeApp/BrewCommands.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import Sake
import SwiftShell

@CommandGroup
struct BrewCommands {
static var ensureGhInstalled: Command {
Command(
description: "Ensure gh is installed",
skipIf: { _ in
run("which", "gh").succeeded
},
run: { _ in
try runAndPrint("brew", "install", "gh")
}
)
}

static var ensureGitCliffInstalled: Command {
Command(
description: "Ensure git-cliff is installed",
skipIf: { _ in
run("which", "git-cliff").succeeded
},
run: { _ in
try runAndPrint("brew", "install", "git-cliff")
}
)
}
}
51 changes: 51 additions & 0 deletions SakeApp/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"originHash" : "564ae29a93959e0a64ff9ad1a401e5db179007f3ecef20571f852606328631f6",
"pins" : [
{
"identity" : "sake",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kattouf/Sake",
"state" : {
"revision" : "f2c91c8ecb4f67f0c565b081deb7d180761a21d7",
"version" : "0.2.2"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "41982a3656a71c768319979febd796c6fd111d5c",
"version" : "1.5.0"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"revision" : "64889f0c732f210a935a0ad7cda38f77f876262d",
"version" : "509.1.1"
}
},
{
"identity" : "swiftshell",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kareman/SwiftShell",
"state" : {
"revision" : "99680b2efc7c7dbcace1da0b3979d266f02e213c",
"version" : "5.1.0"
}
},
{
"identity" : "yams",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jpsim/Yams.git",
"state" : {
"revision" : "3036ba9d69cf1fd04d433527bc339dc0dc75433d",
"version" : "5.1.3"
}
}
],
"version" : 3
}
29 changes: 29 additions & 0 deletions SakeApp/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import CompilerPluginSupport
import PackageDescription

let package = Package(
name: "SakeApp",
platforms: [.macOS(.v10_15)], // Required by SwiftSyntax for the macro feature in Sake
products: [
.executable(name: "SakeApp", targets: ["SakeApp"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.0"),
.package(url: "https://github.com/kattouf/Sake", from: "0.1.0"),
.package(url: "https://github.com/kareman/SwiftShell", from: "5.1.0"),
],
targets: [
.executableTarget(
name: "SakeApp",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
"Sake",
"SwiftShell",
],
path: "."
),
]
)
Loading

0 comments on commit 23bb23a

Please sign in to comment.