Compare commits
No commits in common. "main" and "v1.1.3" have entirely different histories.
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"isRoot": true,
|
|
||||||
"tools": {
|
|
||||||
"gitversion.tool": {
|
|
||||||
"version": "5.9.0",
|
|
||||||
"commands": [
|
|
||||||
"dotnet-gitversion"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dotnet-reportgenerator-globaltool": {
|
|
||||||
"version": "5.1.3",
|
|
||||||
"commands": [
|
|
||||||
"reportgenerator"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -103,7 +103,7 @@ tab_width = 2
|
||||||
|
|
||||||
[*.{cs,js,json,jsx,proto,resjson,ts,tsx}]
|
[*.{cs,js,json,jsx,proto,resjson,ts,tsx}]
|
||||||
indent_style=space
|
indent_style=space
|
||||||
indent_size = 4
|
indent_size=space
|
||||||
tab_width=4
|
tab_width=4
|
||||||
|
|
||||||
[*.{asax,ascx,aspx,cshtml,css,htm,html,master,razor,skin,vb,xaml,xamlx,xoml}]
|
[*.{asax,ascx,aspx,cshtml,css,htm,html,master,razor,skin,vb,xaml,xamlx,xoml}]
|
||||||
|
|
12
.gitignore
vendored
12
.gitignore
vendored
|
@ -11,15 +11,3 @@ obj/
|
||||||
.idea/
|
.idea/
|
||||||
_ReSharper.Caches/
|
_ReSharper.Caches/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
|
||||||
# NixOS
|
|
||||||
.direnv/
|
|
||||||
|
|
||||||
# Tests and Coverage
|
|
||||||
coverage
|
|
||||||
TestResults/
|
|
||||||
tests/artifacts/
|
|
||||||
|
|
||||||
# Lefthook
|
|
||||||
.lefthook-local/
|
|
||||||
lefthook-local.yml
|
|
||||||
|
|
51
.gitlab-ci.yml
Normal file
51
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
default:
|
||||||
|
before_script:
|
||||||
|
- curl -sL https://deb.nodesource.com/setup_15.x | bash -
|
||||||
|
- apt-get install -y nodejs
|
||||||
|
|
||||||
|
build:
|
||||||
|
image: mcr.microsoft.com/dotnet/sdk:5.0
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
# Set up the environment.
|
||||||
|
- npx npm install --ci
|
||||||
|
- npx commitlint-gitlab-ci -x @commitlint/config-conventional
|
||||||
|
|
||||||
|
# Build and test everything.
|
||||||
|
- dotnet restore
|
||||||
|
- dotnet build
|
||||||
|
- 'dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" --collect:"XPlat Code Coverage"'
|
||||||
|
|
||||||
|
# Summarize the output for Gitlab CI reporting.
|
||||||
|
- dotnet new tool-manifest
|
||||||
|
- dotnet tool install dotnet-reportgenerator-globaltool
|
||||||
|
- dotnet tool run reportgenerator -reports:src/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"
|
||||||
|
- grep "Line coverage" coverage/Summary.txt
|
||||||
|
|
||||||
|
# Perform the release.
|
||||||
|
- npx semantic-release
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_TITLE =~ /^chore\(release\)/'
|
||||||
|
when: never
|
||||||
|
- if: '$CI_COMMIT_TAG'
|
||||||
|
when: never
|
||||||
|
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
|
||||||
|
when: never
|
||||||
|
- when: on_success
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
when: always
|
||||||
|
paths:
|
||||||
|
- ./**/*test-result.xml
|
||||||
|
- ./coverage/Cobertura.xml
|
||||||
|
- ./coverage/Summary.*
|
||||||
|
- ./**/*.nupkg
|
||||||
|
reports:
|
||||||
|
junit:
|
||||||
|
- ./**/*test-result.xml
|
||||||
|
cobertura:
|
||||||
|
- ./coverage/Cobertura.xml
|
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx --no-install commitlint --edit $1
|
|
@ -1,8 +0,0 @@
|
||||||
*~
|
|
||||||
flake.*
|
|
||||||
|
|
||||||
node_modules/
|
|
||||||
.direnv/
|
|
||||||
.config/
|
|
||||||
obj/
|
|
||||||
bin/
|
|
|
@ -1,36 +0,0 @@
|
||||||
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*
|
|
||||||
|
|
||||||
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
|
|
22
CHANGELOG.md
Normal file
22
CHANGELOG.md
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
## [1.1.3](https://gitlab.com/mfgames-cil/mfgames-locking-cil/compare/v1.1.2...v1.1.3) (2021-09-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* working on pushing ([5c66619](https://gitlab.com/mfgames-cil/mfgames-locking-cil/commit/5c66619e12587ada01c5eafd5a4aa5d8f6ef3c5d))
|
||||||
|
|
||||||
|
## [1.1.2](https://gitlab.com/mfgames-cil/mfgames-locking-cil/compare/v1.1.1...v1.1.2) (2021-09-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* updating package-lock.json ([d000882](https://gitlab.com/mfgames-cil/mfgames-locking-cil/commit/d000882f96895ffa42c000f0169048354db78bc1))
|
||||||
|
* working on build patterns ([7594b73](https://gitlab.com/mfgames-cil/mfgames-locking-cil/commit/7594b73846b80127ee6ba7ab1d3d0f6d64c81cc5))
|
||||||
|
* working on dependencies ([ba538c0](https://gitlab.com/mfgames-cil/mfgames-locking-cil/commit/ba538c0d86005618c84f3fc6bbf062d60e499a1b))
|
||||||
|
|
||||||
|
## [1.1.1](https://gitlab.com/mfgames-cil/mfgames-locking-cil/compare/v1.1.0...v1.1.1) (2021-01-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* added changelog generation ([d8fa302](https://gitlab.com/mfgames-cil/mfgames-locking-cil/commit/d8fa3029a9c2d0c9523584a78e16d4612fd114f8))
|
|
@ -1,132 +0,0 @@
|
||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
We as members, contributors, and leaders pledge to make participation in our
|
|
||||||
community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
||||||
identity and expression, level of experience, education, socio-economic status,
|
|
||||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
||||||
identity and orientation.
|
|
||||||
|
|
||||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
||||||
diverse, inclusive, and healthy community.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to a positive environment for our
|
|
||||||
community include:
|
|
||||||
|
|
||||||
- Demonstrating empathy and kindness toward other people
|
|
||||||
- Being respectful of differing opinions, viewpoints, and experiences
|
|
||||||
- Giving and gracefully accepting constructive feedback
|
|
||||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
||||||
and learning from the experience
|
|
||||||
- Focusing on what is best not just for us as individuals, but for the overall
|
|
||||||
community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
|
||||||
|
|
||||||
- The use of sexualized language or imagery, and sexual attention or advances of
|
|
||||||
any kind
|
|
||||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
||||||
- Public or private harassment
|
|
||||||
- Publishing others' private information, such as a physical or email address,
|
|
||||||
without their explicit permission
|
|
||||||
- Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
|
||||||
|
|
||||||
Community leaders are responsible for clarifying and enforcing our standards of
|
|
||||||
acceptable behavior and will take appropriate and fair corrective action in
|
|
||||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
||||||
or harmful.
|
|
||||||
|
|
||||||
Community leaders have the right and responsibility to remove, edit, or reject
|
|
||||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
||||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
||||||
decisions when appropriate.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies within all community spaces, and also applies when
|
|
||||||
an individual is officially representing the community in public spaces.
|
|
||||||
Examples of representing our community include using an official e-mail address,
|
|
||||||
posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported to the community leaders responsible for enforcement at
|
|
||||||
[INSERT CONTACT METHOD].
|
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
|
||||||
reporter of any incident.
|
|
||||||
|
|
||||||
## Enforcement Guidelines
|
|
||||||
|
|
||||||
Community leaders will follow these Community Impact Guidelines in determining
|
|
||||||
the consequences for any action they deem in violation of this Code of Conduct:
|
|
||||||
|
|
||||||
### 1. Correction
|
|
||||||
|
|
||||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
||||||
unprofessional or unwelcome in the community.
|
|
||||||
|
|
||||||
**Consequence**: A private, written warning from community leaders, providing
|
|
||||||
clarity around the nature of the violation and an explanation of why the
|
|
||||||
behavior was inappropriate. A public apology may be requested.
|
|
||||||
|
|
||||||
### 2. Warning
|
|
||||||
|
|
||||||
**Community Impact**: A violation through a single incident or series of
|
|
||||||
actions.
|
|
||||||
|
|
||||||
**Consequence**: A warning with consequences for continued behavior. No
|
|
||||||
interaction with the people involved, including unsolicited interaction with
|
|
||||||
those enforcing the Code of Conduct, for a specified period of time. This
|
|
||||||
includes avoiding interactions in community spaces as well as external channels
|
|
||||||
like social media. Violating these terms may lead to a temporary or permanent
|
|
||||||
ban.
|
|
||||||
|
|
||||||
### 3. Temporary Ban
|
|
||||||
|
|
||||||
**Community Impact**: A serious violation of community standards, including
|
|
||||||
sustained inappropriate behavior.
|
|
||||||
|
|
||||||
**Consequence**: A temporary ban from any sort of interaction or public
|
|
||||||
communication with the community for a specified period of time. No public or
|
|
||||||
private interaction with the people involved, including unsolicited interaction
|
|
||||||
with those enforcing the Code of Conduct, is allowed during this period.
|
|
||||||
Violating these terms may lead to a permanent ban.
|
|
||||||
|
|
||||||
### 4. Permanent Ban
|
|
||||||
|
|
||||||
**Community Impact**: Demonstrating a pattern of violation of community
|
|
||||||
standards, including sustained inappropriate behavior, harassment of an
|
|
||||||
individual, or aggression toward or disparagement of classes of individuals.
|
|
||||||
|
|
||||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
||||||
community.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
||||||
version 2.1, available at
|
|
||||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
||||||
|
|
||||||
Community Impact Guidelines were inspired by
|
|
||||||
[Mozilla's code of conduct enforcement ladder][mozilla coc].
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
|
||||||
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
|
|
||||||
[https://www.contributor-covenant.org/translations][translations].
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
||||||
[mozilla coc]: https://github.com/mozilla/diversity
|
|
||||||
[faq]: https://www.contributor-covenant.org/faq
|
|
||||||
[translations]: https://www.contributor-covenant.org/translations
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 15.0.26124.0
|
VisualStudioVersion = 15.0.26124.0
|
||||||
|
@ -7,7 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EE3B4148-AC0
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MfGames.Locking", "src\MfGames.Locking\MfGames.Locking.csproj", "{016D2590-46B8-4776-A7F9-1B0586920932}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MfGames.Locking", "src\MfGames.Locking\MfGames.Locking.csproj", "{016D2590-46B8-4776-A7F9-1B0586920932}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Locking.Tests", "tests\MfGames.Locking.Tests\MfGames.Locking.Tests.csproj", "{50475AFD-8D3A-4AB2-9B16-A2FC3D6AE05C}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Locking.Tests", "src\MfGames.Locking.Tests\MfGames.Locking.Tests.csproj", "{50475AFD-8D3A-4AB2-9B16-A2FC3D6AE05C}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
16
NuGet.Config
16
NuGet.Config
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<clear />
|
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
|
||||||
<add key="mfgames.com" value="https://src.mfgames.com/api/packages/mfgames-cil/nuget/index.json" protocolVersion="3" />
|
|
||||||
</packageSources>
|
|
||||||
<packageSourceMapping>
|
|
||||||
<packageSource key="nuget.org">
|
|
||||||
<package pattern="*" />
|
|
||||||
</packageSource>
|
|
||||||
<packageSource key="mfgames.com">
|
|
||||||
<package pattern="MfGames.*" />
|
|
||||||
</packageSource>
|
|
||||||
</packageSourceMapping>
|
|
||||||
</configuration>
|
|
3
commitlint.config.js
Normal file
3
commitlint.config.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: ["@commitlint/config-conventional"],
|
||||||
|
};
|
42
flake.lock
42
flake.lock
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-utils": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1659877975,
|
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1662019588,
|
|
||||||
"narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "2da64a81275b68fdad38af669afeda43d401e94b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
24
flake.nix
24
flake.nix
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
description = "A .NET core library for easily building CLI tools";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
let pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in {
|
|
||||||
devShell = pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.dotnet-sdk
|
|
||||||
pkgs.lefthook
|
|
||||||
pkgs.convco
|
|
||||||
pkgs.nodePackages.prettier
|
|
||||||
pkgs.nixfmt
|
|
||||||
pkgs.jq
|
|
||||||
];
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
22
lefthook.yml
22
lefthook.yml
|
@ -1,22 +0,0 @@
|
||||||
pre-commit:
|
|
||||||
parallel: true
|
|
||||||
commands:
|
|
||||||
dotnet-format:
|
|
||||||
glob: "*.cs"
|
|
||||||
run: dotnet format
|
|
||||||
prettier:
|
|
||||||
run: prettier . --write --loglevel warn
|
|
||||||
nixfmt:
|
|
||||||
run: nixfmt flake.nix
|
|
||||||
|
|
||||||
commit-msg:
|
|
||||||
commands:
|
|
||||||
commit-check:
|
|
||||||
run: convco check -n 1
|
|
||||||
|
|
||||||
skip_output:
|
|
||||||
- meta # Skips lefthook version printing
|
|
||||||
- summary # Skips summary block (successful and failed steps) printing
|
|
||||||
- success # Skips successful steps printing
|
|
||||||
- failure # Skips failed steps printing
|
|
||||||
- execution # Skips printing successfully executed commands and their output (but still prints failed executions)
|
|
12304
package-lock.json
generated
Normal file
12304
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
21
package.json
Normal file
21
package.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "mfgames-locking-cil",
|
||||||
|
"version": "1.1.3",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "husky install"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@commitlint/cli": "^13.1.0",
|
||||||
|
"@commitlint/config-conventional": "^13.1.0",
|
||||||
|
"@semantic-release/changelog": "^5.0.1",
|
||||||
|
"@semantic-release/git": "^9.0.0",
|
||||||
|
"@semantic-release/gitlab": "^6.2.2",
|
||||||
|
"@semantic-release/npm": "^7.1.3",
|
||||||
|
"commitlint-gitlab-ci": "^0.0.4",
|
||||||
|
"husky": "^7.0.2",
|
||||||
|
"semantic-release": "^17.4.7",
|
||||||
|
"semantic-release-dotnet": "^1.0.0",
|
||||||
|
"semantic-release-nuget": "^1.0.2"
|
||||||
|
}
|
||||||
|
}
|
14
release.config.js
Normal file
14
release.config.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
module.exports = {
|
||||||
|
branches: ["main"],
|
||||||
|
message: "chore(release): v${nextRelease.version}\n\n${nextRelease.notes}",
|
||||||
|
plugins: [
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
"@semantic-release/npm",
|
||||||
|
"semantic-release-dotnet",
|
||||||
|
"semantic-release-nuget",
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
"@semantic-release/git",
|
||||||
|
"@semantic-release/gitlab",
|
||||||
|
],
|
||||||
|
};
|
|
@ -1,23 +0,0 @@
|
||||||
# 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.
|
|
||||||
|
|
||||||
## `format.sh`
|
|
||||||
|
|
||||||
This is used to format the code base using our standards. It matches the commands in the `lefthook` pre-commit hook.
|
|
||||||
|
|
||||||
## `release.sh`
|
|
||||||
|
|
||||||
Intended to run in a CI environment, this creates a NuGet package and publishes it.
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
|
||||||
./scripts/setup.sh || exit 1
|
|
||||||
|
|
||||||
echo "$(basename $0): building project"
|
|
||||||
dotnet build
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
|
||||||
lefthook run pre-commit
|
|
|
@ -1,51 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
|
||||||
./scripts/setup.sh || exit 1
|
|
||||||
|
|
||||||
# Verify the input.
|
|
||||||
if [ "x$GITEA_TOKEN" = "x" ]
|
|
||||||
then
|
|
||||||
echo "the environment variable GITEA_TOKEN is not defined"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Clean up everything from the previous runs.
|
|
||||||
echo "$(basename $0): cleaning project"
|
|
||||||
dotnet clean
|
|
||||||
|
|
||||||
# Version the file based on the Git repository.
|
|
||||||
echo "$(basename $0): setting project version"
|
|
||||||
(cd src && dotnet dotnet-gitversion /updateprojectfiles)
|
|
||||||
SEMVER="v$(dotnet gitversion /output json | jq -r .SemVer)"
|
|
||||||
|
|
||||||
if [ "x$SEMVER" = "x" ]
|
|
||||||
then
|
|
||||||
echo "$(basename $0): cannot figure out the semantic version"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build to pick up the new version.
|
|
||||||
echo "$(basename $0): building project $SEMVER"
|
|
||||||
dotnet build || exit 1
|
|
||||||
|
|
||||||
# Create and publish the NuGet packages.
|
|
||||||
echo "$(basename $0): creating NuGet packages"
|
|
||||||
dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg || exit 1
|
|
||||||
|
|
||||||
echo "$(basename $0): publishing NuGet package"
|
|
||||||
dotnet nuget remove source mfgames.com >& /dev/null
|
|
||||||
dotnet nuget add source --name mfgames.com --username dmoonfire --password $GITEA_TOKEN https://src.mfgames.com/api/packages/mfgames-cil/nuget/index.json --store-password-in-clear-text || exit 1
|
|
||||||
dotnet nuget push --skip-duplicate --source mfgames.com src/*/bin/Debug/*.nupkg || exit 1
|
|
||||||
|
|
||||||
# Tag and push, but only if we don't have a tag.
|
|
||||||
if ! git tag | grep $SEMVER >& /dev/null
|
|
||||||
then
|
|
||||||
echo "$(basename $0): tagging and pushing"
|
|
||||||
git remote add publish https://dmoonfire:$GITEA_TOKEN@src.mfgames.com/mfgames-cil/$(basename $(git config --get remote.origin.url))
|
|
||||||
git tag $SEMVER
|
|
||||||
git push publish $SEMVER || exit 1
|
|
||||||
git remote remove publish
|
|
||||||
else
|
|
||||||
echo "$(basename $0): not tagging, already exists"
|
|
||||||
fi
|
|
|
@ -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 prettier 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
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
|
||||||
|
|
||||||
if [ -f ./tests/*/*.csproj ]
|
|
||||||
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
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
|
||||||
git pull template main --no-rebase
|
|
|
@ -1,15 +0,0 @@
|
||||||
<Project>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<Version>1.0.3</Version>
|
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
|
||||||
<Authors>Dylan Moonfire</Authors>
|
|
||||||
<Company>Moonfire Games</Company>
|
|
||||||
<RepositoryUrl>https://gitlab.com/mfgames-cil/mfgames-locking-cil</RepositoryUrl>
|
|
||||||
<RepositoryType>Git</RepositoryType>
|
|
||||||
<PackageTags>io</PackageTags>
|
|
||||||
<PackageProjectUrl>https://gitlab.com/mfgames-cil/mfgames-locking-cil</PackageProjectUrl>
|
|
||||||
<PackageLicense>MIT</PackageLicense>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
|
@ -1,36 +1,33 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6</TargetFramework>
|
<TargetFramework>net5</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CompareNETObjects" Version="4.78.0" />
|
<PackageReference Include="CompareNETObjects" Version="4.70.0" />
|
||||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
<PackageReference Include="coverlet.collector" Version="3.0.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="JunitXml.TestLogger" Version="3.0.114" />
|
<PackageReference Include="JunitXml.TestLogger" Version="2.1.81" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
|
||||||
<PackageReference Include="Roslynator.Analyzers" Version="4.1.1">
|
<PackageReference Include="Roslynator.Analyzers" Version="3.0.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.1.1">
|
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="1.0.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
<PackageReference Include="xunit" Version="2.3.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
|
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\MfGames.Locking\MfGames.Locking.csproj" />
|
<ProjectReference Include="..\MfGames.Locking\MfGames.Locking.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -1,15 +1,38 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;net6</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net45;net5</TargetFrameworks>
|
||||||
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||||
|
<Authors>Dylan Moonfire</Authors>
|
||||||
|
<Company>Moonfire Games</Company>
|
||||||
|
<RepositoryUrl>https://gitlab.com/mfgames/mfgames-locking-cil</RepositoryUrl>
|
||||||
|
<RepositoryType>Git</RepositoryType>
|
||||||
|
<PackageTags>locking</PackageTags>
|
||||||
|
<PackageProjectUrl>https://gitlab.com/mfgames/mfgames-locking-cil</PackageProjectUrl>
|
||||||
|
<PackageLicense>MIT</PackageLicense>
|
||||||
<Description>Wrappers and patterns for working with ReaderWriterLockSlim.</Description>
|
<Description>Wrappers and patterns for working with ReaderWriterLockSlim.</Description>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
|
<OutputPath>..\..\bin</OutputPath>
|
||||||
|
<DocumentationFile>..\..\bin\$(AssemblyName).xml</DocumentationFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
<OutputPath>..\..\bin</OutputPath>
|
||||||
|
<DocumentationFile>..\..\bin\$(AssemblyName).xml</DocumentationFile>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Roslynator.Analyzers" Version="4.1.1">
|
<Compile Remove="Serialization\**" />
|
||||||
|
<EmbeddedResource Remove="Serialization\**" />
|
||||||
|
<None Remove="Serialization\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Roslynator.Analyzers" Version="3.0.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.1.1">
|
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="1.0.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# Source Directories
|
|
|
@ -1 +0,0 @@
|
||||||
# Test Projects
|
|
Reference in a new issue