-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created package for new CLI tool "dreimetadaten"
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
DIR = bin | ||
SWIFTBUILD = swift build --package-path code -c release --product | ||
BINARIES = code/.build/release | ||
|
||
.PHONY: dreimetadaten all clean distclean | ||
.DEFAULT_GOAL := all | ||
|
||
|
||
$(DIR): | ||
mkdir $(DIR) | ||
|
||
dreimetadaten: | ||
$(SWIFTBUILD) dreimetadaten | ||
|
||
|
||
all: $(DIR) dreimetadaten | ||
@cp -v $(BINARIES)/dreimetadaten $(DIR)/ | ||
|
||
clean: | ||
swift package clean --package-path code | ||
rm -f $(DIR)/dreimetadaten | ||
|
||
distclean: clean | ||
rm -f code/Package.resolved |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/.build | ||
|
||
.swiftpm | ||
Package.resolved | ||
|
||
xcuserdata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// swift-tools-version: 5.7 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "dreimetadaten", | ||
products: [ | ||
.executable(name: "dreimetadaten", targets: ["dreimetadaten"]), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/YourMJK/CommandLineTool", from: "1.1.0"), | ||
], | ||
targets: [ | ||
.executableTarget( | ||
name: "dreimetadaten", | ||
dependencies: [ | ||
"CommandLineTool", | ||
], | ||
path: "dreimetadaten" | ||
) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Command.swift | ||
// dreimetadaten | ||
// | ||
// Created by YourMJK on 26.03.24. | ||
// | ||
|
||
import Foundation | ||
import CommandLineTool | ||
import ArgumentParser | ||
|
||
@main | ||
struct Command: ParsableCommand { | ||
static let configuration = CommandConfiguration( | ||
commandName: executableName, | ||
version: "1.0.0" | ||
) | ||
} |