From 99e4a5982faad1780e6745e672204f88a85eeff5 Mon Sep 17 00:00:00 2001 From: Xuanye Wong Date: Mon, 26 Apr 2021 15:18:32 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 138 +++++++++--------- .vscode/launch.json | 90 ++++++------ .vscode/solution-explorer/class.cs-template | 16 +- .vscode/solution-explorer/class.ts-template | 4 +- .vscode/solution-explorer/class.vb-template | 18 +-- .vscode/solution-explorer/default.ts-template | 4 +- .vscode/solution-explorer/enum.cs-template | 16 +- .../solution-explorer/interface.cs-template | 16 +- .../solution-explorer/interface.ts-template | 4 +- .vscode/solution-explorer/template-list.json | 90 ++++++------ .vscode/tasks.json | 28 ++-- LICENSE | 42 +++--- .../Properties/launchSettings.json | 52 +++---- samples/ASPNetCoreExecutor/appsettings.json | 34 ++--- scripts/build.sh | 28 ++-- scripts/nuget.sh | 36 ++--- scripts/package.sh | 34 ++--- 17 files changed, 325 insertions(+), 325 deletions(-) diff --git a/.gitignore b/.gitignore index 069b0d8..4b1a4a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,70 +1,70 @@ -# Misc folders -[Bb]in/ -[Oo]bj/ -[Pp]ackages/ - -# Build related -tools/** -!tools/packages.config - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.sln.docstates -*.sln.ide/ -*.userprefs -*.GhostDoc.xml - -# Build results -[Dd]ebug/ -[Rr]elease/ -x64/ -*_i.c -*_p.c -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.log -*.vspscc -*.vssscc -.builds - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# ReSharper is a .NET coding add-in -_ReSharper* - -# NCrunch -*.ncrunch* -.*crunch*.local.xml -_NCrunch_* - -artifacts/ -# NuGet Packages Directory -packages - -# Windows -Thumbs.db - -# NUnit -TestResult.xml -.vs/ -.idea/ - +# Misc folders +[Bb]in/ +[Oo]bj/ +[Pp]ackages/ + +# Build related +tools/** +!tools/packages.config + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates +*.sln.ide/ +*.userprefs +*.GhostDoc.xml + +# Build results +[Dd]ebug/ +[Rr]elease/ +x64/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.log +*.vspscc +*.vssscc +.builds + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# ReSharper is a .NET coding add-in +_ReSharper* + +# NCrunch +*.ncrunch* +.*crunch*.local.xml +_NCrunch_* + +artifacts/ +# NuGet Packages Directory +packages + +# Windows +Thumbs.db + +# NUnit +TestResult.xml +.vs/ +.idea/ + doc/_site/ \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 29b256d..7481685 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,46 +1,46 @@ -{ - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "version": "0.2.0", - "configurations": [ - { - "name": ".NET Core Launch (web)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/samples/ASPNetCoreExecutor/bin/Debug/netcoreapp2.2/ASPNetCoreExecutor.dll", - "args": [], - "cwd": "${workspaceFolder}/samples/ASPNetCoreExecutor", - "stopAtEntry": false, - "internalConsoleOptions": "openOnSessionStart", - "launchBrowser": { - "enabled": true, - "args": "${auto-detect-url}", - "windows": { - "command": "cmd.exe", - "args": "/C start ${auto-detect-url}" - }, - "osx": { - "command": "open" - }, - "linux": { - "command": "xdg-open" - } - }, - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "sourceFileMap": { - "/Views": "${workspaceFolder}/Views" - } - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach", - "processId": "${command:pickProcess}" - } - ,] +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/samples/ASPNetCoreExecutor/bin/Debug/netcoreapp2.2/ASPNetCoreExecutor.dll", + "args": [], + "cwd": "${workspaceFolder}/samples/ASPNetCoreExecutor", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart", + "launchBrowser": { + "enabled": true, + "args": "${auto-detect-url}", + "windows": { + "command": "cmd.exe", + "args": "/C start ${auto-detect-url}" + }, + "osx": { + "command": "open" + }, + "linux": { + "command": "xdg-open" + } + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ,] } \ No newline at end of file diff --git a/.vscode/solution-explorer/class.cs-template b/.vscode/solution-explorer/class.cs-template index 015da46..c889c9a 100644 --- a/.vscode/solution-explorer/class.cs-template +++ b/.vscode/solution-explorer/class.cs-template @@ -1,8 +1,8 @@ -using System; - -namespace {{namespace}} -{ - public class {{name}} - { - } -} +using System; + +namespace {{namespace}} +{ + public class {{name}} + { + } +} diff --git a/.vscode/solution-explorer/class.ts-template b/.vscode/solution-explorer/class.ts-template index ff2edef..39aefde 100644 --- a/.vscode/solution-explorer/class.ts-template +++ b/.vscode/solution-explorer/class.ts-template @@ -1,3 +1,3 @@ -export class {{name}} { - +export class {{name}} { + } \ No newline at end of file diff --git a/.vscode/solution-explorer/class.vb-template b/.vscode/solution-explorer/class.vb-template index 38ef67f..aed3c38 100644 --- a/.vscode/solution-explorer/class.vb-template +++ b/.vscode/solution-explorer/class.vb-template @@ -1,9 +1,9 @@ -Imports System - -Namespace {{namespace}} - - Public Class {{name}} - - End Class - -End Namespace +Imports System + +Namespace {{namespace}} + + Public Class {{name}} + + End Class + +End Namespace diff --git a/.vscode/solution-explorer/default.ts-template b/.vscode/solution-explorer/default.ts-template index 04af870..2e4f2b0 100644 --- a/.vscode/solution-explorer/default.ts-template +++ b/.vscode/solution-explorer/default.ts-template @@ -1,3 +1,3 @@ -export default {{name}} { - +export default {{name}} { + } \ No newline at end of file diff --git a/.vscode/solution-explorer/enum.cs-template b/.vscode/solution-explorer/enum.cs-template index 7d4cdee..c70f44c 100644 --- a/.vscode/solution-explorer/enum.cs-template +++ b/.vscode/solution-explorer/enum.cs-template @@ -1,8 +1,8 @@ -using System; - -namespace {{namespace}} -{ - public enum {{name}} - { - } -} +using System; + +namespace {{namespace}} +{ + public enum {{name}} + { + } +} diff --git a/.vscode/solution-explorer/interface.cs-template b/.vscode/solution-explorer/interface.cs-template index 6b5dec1..d6614b8 100644 --- a/.vscode/solution-explorer/interface.cs-template +++ b/.vscode/solution-explorer/interface.cs-template @@ -1,8 +1,8 @@ -using System; - -namespace {{namespace}} -{ - public interface {{name}} - { - } -} +using System; + +namespace {{namespace}} +{ + public interface {{name}} + { + } +} diff --git a/.vscode/solution-explorer/interface.ts-template b/.vscode/solution-explorer/interface.ts-template index 3ea404b..7797f1b 100644 --- a/.vscode/solution-explorer/interface.ts-template +++ b/.vscode/solution-explorer/interface.ts-template @@ -1,3 +1,3 @@ -export interface {{name}} { - +export interface {{name}} { + } \ No newline at end of file diff --git a/.vscode/solution-explorer/template-list.json b/.vscode/solution-explorer/template-list.json index 2849622..4deb45f 100644 --- a/.vscode/solution-explorer/template-list.json +++ b/.vscode/solution-explorer/template-list.json @@ -1,46 +1,46 @@ -{ - "templates": [ - { - "name": "Class", - "extension": "cs", - "file": "./class.cs-template", - "parameters": "./template-parameters.js" - }, - { - "name": "Interface", - "extension": "cs", - "file": "./interface.cs-template", - "parameters": "./template-parameters.js" - }, - { - "name": "Enum", - "extension": "cs", - "file": "./enum.cs-template", - "parameters": "./template-parameters.js" - }, - { - "name": "Class", - "extension": "ts", - "file": "./class.ts-template", - "parameters": "./template-parameters.js" - }, - { - "name": "Interface", - "extension": "ts", - "file": "./interface.ts-template", - "parameters": "./template-parameters.js" - }, - { - "name": "Default", - "extension": "ts", - "file": "./default.ts-template", - "parameters": "./template-parameters.js" - }, - { - "name": "Class", - "extension": "vb", - "file": "./class.vb-template", - "parameters": "./template-parameters.js" - } - ] +{ + "templates": [ + { + "name": "Class", + "extension": "cs", + "file": "./class.cs-template", + "parameters": "./template-parameters.js" + }, + { + "name": "Interface", + "extension": "cs", + "file": "./interface.cs-template", + "parameters": "./template-parameters.js" + }, + { + "name": "Enum", + "extension": "cs", + "file": "./enum.cs-template", + "parameters": "./template-parameters.js" + }, + { + "name": "Class", + "extension": "ts", + "file": "./class.ts-template", + "parameters": "./template-parameters.js" + }, + { + "name": "Interface", + "extension": "ts", + "file": "./interface.ts-template", + "parameters": "./template-parameters.js" + }, + { + "name": "Default", + "extension": "ts", + "file": "./default.ts-template", + "parameters": "./template-parameters.js" + }, + { + "name": "Class", + "extension": "vb", + "file": "./class.vb-template", + "parameters": "./template-parameters.js" + } + ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index cb5b8b5..23f241b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,15 +1,15 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj" - ], - "problemMatcher": "$msCompile" - } - ] +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj" + ], + "problemMatcher": "$msCompile" + } + ] } \ No newline at end of file diff --git a/LICENSE b/LICENSE index 09e8c14..1672b90 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2019 xuanye wong - -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. +MIT License + +Copyright (c) 2019 xuanye wong + +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/samples/ASPNetCoreExecutor/Properties/launchSettings.json b/samples/ASPNetCoreExecutor/Properties/launchSettings.json index b42d92a..4b8ab8d 100644 --- a/samples/ASPNetCoreExecutor/Properties/launchSettings.json +++ b/samples/ASPNetCoreExecutor/Properties/launchSettings.json @@ -1,27 +1,27 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:60087/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "ASPNetCoreExecutor": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:5000/" - } - } +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:60087/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "ASPNetCoreExecutor": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:5000/" + } + } } \ No newline at end of file diff --git a/samples/ASPNetCoreExecutor/appsettings.json b/samples/ASPNetCoreExecutor/appsettings.json index c509c70..73aed1b 100644 --- a/samples/ASPNetCoreExecutor/appsettings.json +++ b/samples/ASPNetCoreExecutor/appsettings.json @@ -1,17 +1,17 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information" - } - }, - "xxlJob": { - "adminAddresses": "http://127.0.0.1:8080/xxl-job-admin", - "appName": "xxl-job-executor-dotnet", - "specialBindAddress": "127.0.0.1", - "port": 5000, - "autoRegistry": true, - "accessToken": "", - "logRetentionDays": 30 - } - -} +{ + "Logging": { + "LogLevel": { + "Default": "Information" + } + }, + "xxlJob": { + "adminAddresses": "http://127.0.0.1:8080/xxl-job-admin", + "appName": "xxl-job-executor-dotnet", + "specialBindAddress": "127.0.0.1", + "port": 5000, + "autoRegistry": true, + "accessToken": "", + "logRetentionDays": 30 + } + +} diff --git a/scripts/build.sh b/scripts/build.sh index 9d4b78d..2d9f105 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,14 +1,14 @@ -set -ex - -cd $(dirname $0)/../ - -artifactsFolder="./artifacts" - -if [ -d $artifactsFolder ]; then - rm -R $artifactsFolder -fi - -mkdir -p $artifactsFolder - -dotnet restore ./DotXxlJob.sln -dotnet build ./DotXxlJob.sln -c Release +set -ex + +cd $(dirname $0)/../ + +artifactsFolder="./artifacts" + +if [ -d $artifactsFolder ]; then + rm -R $artifactsFolder +fi + +mkdir -p $artifactsFolder + +dotnet restore ./DotXxlJob.sln +dotnet build ./DotXxlJob.sln -c Release diff --git a/scripts/nuget.sh b/scripts/nuget.sh index af434aa..ddadb60 100644 --- a/scripts/nuget.sh +++ b/scripts/nuget.sh @@ -1,18 +1,18 @@ -set -ex - -cd $(dirname $0)/../ - -artifactsFolder="./artifacts" - -if [ -d $artifactsFolder ]; then - rm -R $artifactsFolder -fi - -mkdir -p $artifactsFolder - - -dotnet build ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release - -dotnet pack ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release -o $artifactsFolder - -dotnet nuget push $artifactsFolder/DotXxlJob.Core.*.nupkg -k $NUGET_KEY -s https://www.nuget.org +set -ex + +cd $(dirname $0)/../ + +artifactsFolder="./artifacts" + +if [ -d $artifactsFolder ]; then + rm -R $artifactsFolder +fi + +mkdir -p $artifactsFolder + + +dotnet build ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release + +dotnet pack ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release -o $artifactsFolder + +dotnet nuget push $artifactsFolder/DotXxlJob.Core.*.nupkg -k $NUGET_KEY -s https://www.nuget.org diff --git a/scripts/package.sh b/scripts/package.sh index 9c602cf..b7d69ea 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -1,17 +1,17 @@ -set -ex - -cd $(dirname $0)/../ - -artifactsFolder="./artifacts" - -if [ -d $artifactsFolder ]; then - rm -R $artifactsFolder -fi - -mkdir -p $artifactsFolder - -dotnet restore ./DotXxlJob.sln -dotnet build ./DotXxlJob.sln -c Release - - -dotnet pack ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release -o $artifactsFolder +set -ex + +cd $(dirname $0)/../ + +artifactsFolder="./artifacts" + +if [ -d $artifactsFolder ]; then + rm -R $artifactsFolder +fi + +mkdir -p $artifactsFolder + +dotnet restore ./DotXxlJob.sln +dotnet build ./DotXxlJob.sln -c Release + + +dotnet pack ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release -o $artifactsFolder