-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from WeihanLi/dev
1.0.60
- Loading branch information
Showing
210 changed files
with
3,773 additions
and
3,401 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,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"husky": { | ||
"version": "0.6.2", | ||
"commands": [ | ||
"husky" | ||
] | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 | ||
RUN dotnet tool install -g cake.tool | ||
RUN dotnet tool install -g dotnet-httpie | ||
RUN dotnet tool install -g dotnet-exec | ||
RUN dotnet tool install -g dotnet-execute |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,51 +1,33 @@ | ||
name: docfx build | ||
name: docs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
# - dev | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: windows-latest | ||
steps: | ||
# Check out the branch that triggered this workflow to the 'source' subdirectory | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Setup .NET SDK | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
ref: master | ||
path: source | ||
dotnet-version: | | ||
6.0.x | ||
7.0.x | ||
8.0.x | ||
- name: install DocFX | ||
run: "& choco install docfx -y" | ||
# Run a build | ||
run: "dotnet tool install -g docfx" | ||
# - name: output current dir | ||
# run: "dir" | ||
- name: Build docs | ||
run: "& docfx ./docfx.json" | ||
working-directory: ./source | ||
# Check out gh-pages branch to the 'docs' subdirectory | ||
- name: Checkout docs | ||
uses: actions/checkout@v2 | ||
run: "docfx ./docs/docfx.json" | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
ref: gh-pages | ||
path: docs | ||
# Sync the site | ||
- name: Clear docs repo | ||
run: Get-ChildItem -Force -Exclude .git | ForEach-Object { Remove-Item -Recurse -Verbose -Force $_ } | ||
working-directory: ./docs | ||
- name: Sync new content | ||
run: Copy-Item -Recurse -Verbose -Force "$env:GITHUB_WORKSPACE/source/_site/*" "$env:GITHUB_WORKSPACE/docs" | ||
working-directory: ./docs | ||
# update docs | ||
- name: Commit to gh-pages and push | ||
run: | | ||
$ErrorActionPreference = "Continue" | ||
git add -A | ||
git diff HEAD --exit-code | ||
if ($LASTEXITCODE -eq 0) { | ||
Write-Host "No changes to commit!" | ||
} else { | ||
git config --global user.name "github-actions-docfx[bot]" | ||
git config --global user.email "[email protected]" | ||
git commit -m "Updated docs from commit $env:GITHUB_SHA on $env:GITHUB_REF" | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
git push origin gh-pages | ||
} | ||
working-directory: ./docs | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/_site |
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
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
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,9 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
dotnet tool update -g dotnet-execute --prerelease | ||
dotnet husky run --name "commit-message-linter" --args "$1" | ||
|
||
echo | ||
echo Great work! 🥂 | ||
echo |
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 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
## husky task runner examples ------------------- | ||
## Note : for local installation use 'dotnet' prefix. e.g. 'dotnet husky' | ||
|
||
## run all tasks | ||
#husky run | ||
|
||
### run all tasks with group: 'group-name' | ||
#husky run --group group-name | ||
|
||
## run task with name: 'task-name' | ||
#husky run --name task-name | ||
|
||
## pass hook arguments to task | ||
#husky run --args "$1" "$2" | ||
|
||
## or put your custom commands ------------------- | ||
#echo 'Husky.Net is awesome!' | ||
|
||
dotnet husky run --group post-push |
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,11 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# task-runner config https://alirezanet.github.io/Husky.Net/guide/task-runner.html | ||
|
||
# run tasks by task name | ||
# dotnet husky run --name "build" | ||
# dotnet husky run --name "format-verify" | ||
|
||
# run tasks by task group name | ||
# dotnet husky run --group pre-commit |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
dotnet husky run --group pre-push |
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 @@ | ||
/* | ||
A simple regex commit linter | ||
https://www.conventionalcommits.org/en/v1.0.0/ | ||
https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type | ||
*/ | ||
|
||
const string pattern = @"^(?=.{1,90}$)(?:build|feat|ci|chore|docs|fix|perf|refactor|revert|style|sample|test)(?:\(.+\))*(?::).{4,}(?:#\d+)*(?<![\.\s])$"; | ||
|
||
var msg = File.ReadAllLines(args[0])[0]; | ||
Console.WriteLine("Your commit headline message is:\n> {0}", msg); | ||
if (System.Text.RegularExpressions.Regex.IsMatch(msg, pattern)) | ||
return 0; | ||
|
||
Console.ForegroundColor = ConsoleColor.Red; | ||
Console.WriteLine("Invalid commit message"); | ||
Console.ResetColor(); | ||
Console.WriteLine("e.g: 'feat(scope): subject' or 'fix: subject'"); | ||
Console.ForegroundColor = ConsoleColor.Gray; | ||
Console.WriteLine("more info: https://www.conventionalcommits.org/en/v1.0.0/"); | ||
Console.ResetColor(); | ||
|
||
return 1; |
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,30 @@ | ||
{ | ||
"tasks": | ||
[ | ||
{ | ||
"name": "commit-message-linter", | ||
"group": "commit-msg", | ||
"command": "dotnet-exec", | ||
"args": [".husky/scripts/commit-lint.cs", "--args", "${args}"] | ||
}, | ||
{ | ||
"name": "test", | ||
"group": "pre-push", | ||
"command": "dotnet", | ||
"args": [ "test" ], | ||
"exclude": [ | ||
"**/*.md", | ||
"docs/**/*" | ||
] | ||
}, | ||
{ | ||
"name": "dotnet-format", | ||
"group": "post-push", | ||
"command": "dotnet", | ||
"args": [ "format" ], | ||
"include": [ | ||
"**/*.cs" | ||
] | ||
} | ||
] | ||
} |
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
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,2 @@ | ||
<Project> | ||
</Project> |
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,46 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<!-- Enable central package management --> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
<ExtensionPackageVersion Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'net6.0'">6.0.0</ExtensionPackageVersion> | ||
<ExtensionPackageVersion Condition="'$(TargetFramework)' == 'net7.0'">7.0.0</ExtensionPackageVersion> | ||
<ExtensionPackageVersion Condition="'$(TargetFramework)' == 'net8.0'">8.0.0</ExtensionPackageVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="$(ExtensionPackageVersion)" /> | ||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(ExtensionPackageVersion)" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" /> | ||
<PackageVersion Include="System.Reflection.Emit" Version="4.7.0" /> | ||
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" /> | ||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> | ||
<PackageVersion Include="AspectCore.Core" Version="2.4.0" /> | ||
<PackageVersion Include="Castle.Core" Version="5.1.1" /> | ||
<PackageVersion Include="Serilog" Version="3.1.1" /> | ||
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.2" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||
<PackageVersion Include="FluentAssertions" Version="6.6.0" /> | ||
<PackageVersion Include="Moq" Version="4.18.4" /> | ||
<PackageVersion Include="xunit" Version="2.6.1" /> | ||
<PackageVersion Include="Xunit.DependencyInjection" Version="8.7.1" /> | ||
<PackageVersion Include="Xunit.DependencyInjection.Logging" Version="8.1.0" /> | ||
<PackageVersion Include="coverlet.collector" Version="6.0.0" /> | ||
<PackageVersion Include="BenchmarkDotNet" Version="0.13.10" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version=" 8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" /> | ||
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.0" /> | ||
<PackageVersion Include="System.Data.SqlClient" Version="4.8.5" /> | ||
<PackageVersion Include="Dapper" Version="2.1.21" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<GlobalPackageReference Include="PolySharp" Version="1.13.2" /> | ||
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" /> | ||
</ItemGroup> | ||
</Project> |
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
Oops, something went wrong.