diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index ceabcf3..c5055f2 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"gitversion.tool": {
- "version": "5.9.0",
+ "version": "5.12.0",
"commands": [
"dotnet-gitversion"
]
diff --git a/.woodpecker.yml b/.woodpecker.yml
index 3f25d63..67f9692 100644
--- a/.woodpecker.yml
+++ b/.woodpecker.yml
@@ -1,36 +1,36 @@
-clone:
- git:
- image: woodpeckerci/plugin-git
- settings:
- tags: true
+# clone:
+# git:
+# image: woodpeckerci/plugin-git
+# settings:
+# tags: true
-pipeline:
- build:
- image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
- commands:
- - nix develop --command scripts/build.sh
- when:
- event: [push, pull_request, tag]
- tag: v*
+# pipeline:
+# build:
+# image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
+# commands:
+# - nix develop --command scripts/build.sh
+# when:
+# event: [push, pull_request, tag]
+# tag: v*
- test:
- image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
- commands:
- - nix develop --command scripts/test.sh
- when:
- event: [push, pull_request]
- #paths:
- # - ./**/*test-result.xml
- # - ./coverage/Cobertura.xml
- # - ./coverage/Summary.*
- # - ./**/*.nupkg
+# test:
+# image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
+# commands:
+# - nix develop --command scripts/test.sh
+# when:
+# event: [push, pull_request]
+# #paths:
+# # - ./**/*test-result.xml
+# # - ./coverage/Cobertura.xml
+# # - ./coverage/Summary.*
+# # - ./**/*.nupkg
- release-main:
- image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
- commands:
- - nix develop --command scripts/release.sh
- secrets:
- - gitea_token
- when:
- event: push
- branch: main
+# release-main:
+# image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
+# commands:
+# - nix develop --command scripts/release.sh
+# secrets:
+# - gitea_token
+# when:
+# event: push
+# branch: main
diff --git a/Justfile b/Justfile
new file mode 100644
index 0000000..0ac670f
--- /dev/null
+++ b/Justfile
@@ -0,0 +1,29 @@
+@_default:
+ just --choose
+
+# Builds all of the components of this repository.
+build:
+ dotnet build
+
+# Runs all the known tests in the repository.
+test: restore-tools
+ dotnet test \
+ --test-adapter-path:. \
+ --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" \
+ --collect:"XPlat Code Coverage"
+ dotnet tool run reportgenerator \
+ -reports:tests/*/TestResults/*/coverage.cobertura.xml \
+ -targetdir:./coverage \
+ "-reporttypes:Cobertura;TextSummary"
+ grep "Line coverage" coverage/Summary.txt
+
+# Restores all the tools and NuGet packages.
+restore: restore-tools restore-packages
+
+# Restores all the dotnet tools used.
+restore-tools:
+ dotnet tool restore
+
+# Restores all the NuGet packages.
+restore-packages:
+ dotnet restore
diff --git a/LICENSE.md b/LICENSE.md
index fa05903..430c7e3 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
# The MIT License (MIT)
-Copyright © 2021-2022 Dylan Moonfire
+Copyright © 2021-2023 Dylan Moonfire
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 02b160f..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) Moonfire Games
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/MfGames.ToolBuilder.sln b/MfGames.sln
similarity index 100%
rename from MfGames.ToolBuilder.sln
rename to MfGames.sln
diff --git a/MfGames.ToolBuilder.sln.DotSettings b/MfGames.sln.DotSettings
similarity index 100%
rename from MfGames.ToolBuilder.sln.DotSettings
rename to MfGames.sln.DotSettings
diff --git a/NuGet.Config b/NuGet.Config
index ff47af7..4e800bf 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -1,16 +1,12 @@
-
+
-
-
-
-
diff --git a/flake.nix b/flake.nix
index a459683..87ba515 100644
--- a/flake.nix
+++ b/flake.nix
@@ -12,7 +12,7 @@
in {
devShell = pkgs.mkShell {
buildInputs =
- [ pkgs.dotnet-sdk pkgs.lefthook pkgs.convco pkgs.nixfmt pkgs.jq ];
+ [ pkgs.dotnet-sdk pkgs.lefthook pkgs.convco pkgs.nixfmt pkgs.jq pkgs.just ];
};
});
}
diff --git a/scripts/build.sh b/scripts/build.sh
deleted file mode 100755
index 66f32c5..0000000
--- a/scripts/build.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env sh
-
-cd $(dirname $0)/..
-./scripts/setup.sh || exit 1
-
-echo "$(basename $0): building project"
-dotnet build
diff --git a/scripts/format.sh b/scripts/format.sh
deleted file mode 100755
index 7b31af0..0000000
--- a/scripts/format.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env sh
-
-cd $(dirname $0)/..
-lefthook run pre-commit
diff --git a/scripts/setup.sh b/scripts/setup.sh
deleted file mode 100755
index 682dc26..0000000
--- a/scripts/setup.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env sh
-
-# Normalize our environment.
-cd $(dirname $0)/..
-
-# Make sure we have the needed executables installed.
-for e in dotnet lefthook nixfmt
-do
- if ! which $e >& /dev/null
- then
- echo "Cannot find '$e' in the path"
- exit 1
- fi
-done
-
-# Make sure we have lefthook is installed.
-if [ ! -f .git/hooks/pre-commit ]
-then
- echo "$(basename $0): installing lefthook"
- lefthook install
-fi
-
-# Make sure our tools are installed.
-echo "$(basename $0): install .NET tools"
-dotnet tool restore
-
-# Everything is good.
-exit 0
diff --git a/scripts/test.sh b/scripts/test.sh
deleted file mode 100755
index 703bd5f..0000000
--- a/scripts/test.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env sh
-
-cd $(dirname $0)/..
-
-if ls ./tests/*/*.csproj >& /dev/null
-then
- ./scripts/setup.sh || exit 1
-
- dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" --collect:"XPlat Code Coverage"
- dotnet tool run reportgenerator -reports:tests/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"
- grep "Line coverage" coverage/Summary.txt
-fi
diff --git a/scripts/update-template.sh b/scripts/update-template.sh
deleted file mode 100755
index 2d80710..0000000
--- a/scripts/update-template.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env sh
-
-cd $(dirname $0)/..
-git pull template main --no-rebase
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
deleted file mode 100644
index de31d91..0000000
--- a/src/Directory.Build.props
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- true
- Dylan Moonfire
- Moonfire Games
- https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil
- Git
- cli
- https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil
- MIT
-
-
-
diff --git a/src/MfGames.ToolBuilder.Tables/GitVersion.yml b/src/MfGames.ToolBuilder.Tables/GitVersion.yml
new file mode 100644
index 0000000..3e4d65f
--- /dev/null
+++ b/src/MfGames.ToolBuilder.Tables/GitVersion.yml
@@ -0,0 +1,13 @@
+mode: ContinuousDelivery
+increment: Inherit
+continuous-delivery-fallback-tag: ci
+
+major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
+minor-version-bump-message: "^(feat)(\\([\\w\\s-]*\\))?:"
+patch-version-bump-message: "^(build|chore|ci|docs|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?:"
+
+assembly-versioning-scheme: MajorMinorPatch
+assembly-file-versioning-scheme: MajorMinorPatch
+assembly-informational-format: "{InformationalVersion}"
+
+tag-prefix: "MfGames.ToolBuilder.Tables-"
diff --git a/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj b/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj
index 758ef5d..cd50083 100644
--- a/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj
+++ b/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj
@@ -7,6 +7,17 @@
Provides a tool service for creating tools that output tabular data to the console.
+
+ true
+ Dylan Moonfire
+ Moonfire Games
+ https://src.mfgames.com/mfgames-cil/mfgames-cil
+ Git
+ cli
+ https://src.mfgames.com/mfgames-cil/mfgames-cil
+ MIT
+
+
$(NoWarn);NU5104
@@ -17,6 +28,10 @@
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
diff --git a/src/GitVersion.yml b/src/MfGames.ToolBuilder/GitVersion.yml
similarity index 94%
rename from src/GitVersion.yml
rename to src/MfGames.ToolBuilder/GitVersion.yml
index 5dc355f..67f21cd 100644
--- a/src/GitVersion.yml
+++ b/src/MfGames.ToolBuilder/GitVersion.yml
@@ -10,4 +10,4 @@ assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
assembly-informational-format: "{InformationalVersion}"
-tag-prefix: "[vV]"
+tag-prefix: "MfGames.ToolBuilder-"
diff --git a/src/MfGames.ToolBuilder/MfGames.ToolBuilder.csproj b/src/MfGames.ToolBuilder/MfGames.ToolBuilder.csproj
index d1dde7f..9f535ac 100644
--- a/src/MfGames.ToolBuilder/MfGames.ToolBuilder.csproj
+++ b/src/MfGames.ToolBuilder/MfGames.ToolBuilder.csproj
@@ -1,22 +1,34 @@
-
-
+
net6.0
enable
A framework for easily creating command line tools using System.CommandLine, Autofac, and Serilog.
+ True
+
+
+ true
+ Dylan Moonfire
+ Moonfire Games
+ https://src.mfgames.com/mfgames-cil/mfgames-cil
+ Git
+ cli
+ https://src.mfgames.com/mfgames-cil/mfgames-cil
+ MIT
-
$(NoWarn);NU5104
-
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
@@ -48,5 +60,4 @@
-
diff --git a/README.md b/src/MfGames.ToolBuilder/README.md
similarity index 90%
rename from README.md
rename to src/MfGames.ToolBuilder/README.md
index 1642f87..266a304 100644
--- a/README.md
+++ b/src/MfGames.ToolBuilder/README.md
@@ -4,26 +4,6 @@ _An opinionated library for easily creating command-line tools in C#._
MfGames.ToolBuilder is a library to encapsulate the setup and running of tools, CLI components arranged with verbs (like `git`). It includes some opinionated decisions on default setup.
-## Building
-
-To make sure the environment is correctly set up for build:
-
-```sh
-./scripts/setup.sh
-```
-
-To build the project:
-
-```sh
-./scripts/build.sh
-```
-
-To test the project:
-
-```sh
-./scripts/test.sh
-```
-
## Commands
This library is built on top of [System.CommandLine](https://github.com/dotnet/command-line-api) and .NET 6 generic hosting. The commands are combined together using dependency injection (see below) which allows for them to be included as parameters for the constructor or dynamically discovered.
diff --git a/src/README.md b/src/README.md
deleted file mode 100644
index cbaf845..0000000
--- a/src/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# Source Directories