build: removing Node dependency

This commit is contained in:
Dylan R. E. Moonfire 2022-04-02 16:42:32 -05:00
parent 0d17c3f5ba
commit 8945aa89dc
12 changed files with 90 additions and 13604 deletions

View file

@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit $1

View file

@ -1,54 +0,0 @@
## [2.0.1](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/compare/v2.0.0...v2.0.1) (2022-01-02)
### Bug Fixes
* update dependencies ([52797f1](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/52797f136a038cd8f443b29a1e5c8e83f8f3514b))
# [2.0.0](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/compare/v1.0.3...v2.0.0) (2021-12-01)
### Bug Fixes
* **semantic-release:** updating inherits ([7cb572b](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/7cb572bd2e29a31f37ad9c937920abc3cc896d0d))
### Features
* provide the names via the tool builder ([1f1d0a4](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/1f1d0a4d9fa087e03264e25a12e27c6684b45d03))
### BREAKING CHANGES
* Changed the API.
## [1.0.3](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/compare/v1.0.2...v1.0.3) (2021-11-29)
### Bug Fixes
* switch from RootCommand to FakedRootCommand to handle stripped executables ([e5e8777](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/e5e87770f9cab293befb40a21bfef6d52022224b))
## [1.0.2](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/compare/v1.0.1...v1.0.2) (2021-09-12)
### Bug Fixes
* switched from default host builder to avoid directory scan on Linux ([e59d489](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/e59d489a0640f59df2d4957e23ce9bf7df0df0f9))
* tweaking the default table layout ([2327417](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/23274178428f7cf01e2ea099748f5028f529fdb9))
## [1.0.1](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/compare/v1.0.0...v1.0.1) (2021-09-11)
### Bug Fixes
* **nuget:** updating deployment and dependencies ([9b046e9](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/9b046e99d996767f1968ab6ac268c508aaabeffb))
* change config and logging services to be singletons ([25a65d2](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/25a65d230da0f4dcde34b5e17d27b9e867115e8b))
* corrected a spurious reference to the old MfGames.TestSetup ([bb00629](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/bb006290aed6f3143d2ccc8ede8de368cba0a670))
# 1.0.0 (2021-09-10)
### Features
* initial commit ([ad0525b](https://gitlab.com/mfgames-cil/mfgames-toolbuilder-cil/commit/ad0525be0496e845f5c881dab8bcefcbd1e585d0))

View file

@ -1,6 +0,0 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"body-max-line-length": [0],
},
};

View file

@ -11,7 +11,7 @@
let pkgs = nixpkgs.legacyPackages.${system}; let pkgs = nixpkgs.legacyPackages.${system};
in { in {
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
buildInputs = [ pkgs.dotnet-sdk pkgs.nodejs-16_x pkgs.nixfmt ]; buildInputs = [ pkgs.dotnet-sdk pkgs.nixfmt ];
}; };
}); });
} }

34
lefthook.yml Normal file
View file

@ -0,0 +1,34 @@
# EXAMPLE USAGE
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
# pre-commit:
# parallel: true
# commands:
# eslint:
# glob: "*.{js,ts}"
# run: yarn eslint {staged_files}
# rubocop:
# tags: backend style
# glob: "*.rb"
# exclude: "application.rb|routes.rb"
# run: bundle exec rubocop --force-exclusion {all_files}
# govet:
# tags: backend style
# files: git ls-files -m
# glob: "*.go"
# run: go vet {files}
# scripts:
# "hello.js":
# runner: node
# "any.go":
# runner: go run

13506
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,31 +0,0 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
branches: ["main"],
message: "chore(release): v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
plugins: [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
},
],
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
[
"semantic-release-dotnet",
{
paths: ["src/Directory.Build.props"],
},
],
[
"semantic-release-nuget",
{
packArguments: ["--include-symbols", "--include-source"],
pushFiles: ["src/*/bin/Debug/*.nupkg"],
},
],
"@semantic-release/changelog",
"@semantic-release/git",
"@semantic-release/gitlab",
],
};

19
scripts/README.md Normal file
View file

@ -0,0 +1,19 @@
# Scripts Directory
This directory contains the basic scripts for working with the library.
## `setup.sh`
This verifies the environment is correct and makes sure everything is configured.
## `build.sh`
This builds the project and creates the binaries in debug mode.
## `test.sh`
This runs any required tests.
## `release.sh`
Intended to run in a CI environment, this creates a NuGet package and publishes it.

View file

@ -1,4 +1,6 @@
#!/usr/bin/env sh #!/usr/bin/env sh
cd $(dirname $0)/.. cd $(dirname $0)/..
./scripts/setup.sh || exit 1
dotnet build dotnet build

View file

@ -1,8 +1,29 @@
#!/usr/bin/env sh #!/usr/bin/env sh
cd $(dirname $0)/..
(cd src && dotnet dotnet-gitversion /updateprojectfiles) cd $(dirname $0)/..
./scripts/setup.sh || exit 1
# Verify the input.
if [ "x$NUGET_TOKEN" = "x" ]
then
echo "The environment variable NUGET_TOKEN is not defined"
exit 1
fi
if [ "x$NUGET_PUSH_URL" = "x" ]
then
echo "The environment variable NUGET_PUSH_URL is not defined"
exit 1
fi
# Clean up everything from the previous runs.
dotnet clean dotnet clean
# Version the file based on the Git repository.
(cd src && dotnet dotnet-gitversion /updateprojectfiles)
# Build to pick up the new version.
dotnet build dotnet build
# Create and publish the NuGet packages.
dotnet pack --include-symbols --include-source dotnet pack --include-symbols --include-source
dotnet nuget push src/*/bin/Debug/*.nupkg --api-key $NUGET_TOKEN --source $NUGET_PUSH_URL dotnet nuget push src/*/bin/Debug/*.nupkg --api-key $NUGET_TOKEN --source $NUGET_PUSH_URL

9
scripts/setup.sh Normal file → Executable file
View file

@ -1,2 +1,11 @@
#!/usr/bin/env sh #!/usr/bin/env sh
cd $(dirname $0)/.. cd $(dirname $0)/..
# Make sure we have .NET installed
if ! which dotnet >& /dev/null
then
echo "Cannot find 'dotnet' in the path"
exit 1
fi

View file

@ -1,5 +1,7 @@
#!/usr/bin/env sh #!/usr/bin/env sh
cd $(dirname $0)/.. cd $(dirname $0)/..
./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 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" dotnet tool run reportgenerator -reports:tests/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"