Skip to content

Commit

Permalink
Created package for new CLI tool "dreimetadaten"
Browse files Browse the repository at this point in the history
  • Loading branch information
YourMJK committed Apr 7, 2024
1 parent c10b2a2 commit f4f04c3
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Makefile
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
6 changes: 6 additions & 0 deletions code/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.build

.swiftpm
Package.resolved

xcuserdata/
22 changes: 22 additions & 0 deletions code/Package.swift
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"
)
]
)
18 changes: 18 additions & 0 deletions code/dreimetadaten/Command.swift
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"
)
}

0 comments on commit f4f04c3

Please sign in to comment.