From efbefd9b1e71bd08a8f0d11af27b0fdb5e16804e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20St=C3=BChmer?= Date: Tue, 5 Mar 2024 21:29:52 +0100 Subject: [PATCH] Initial commit --- .editorconfig | 78 ++++ .filenesting.json | 3 + .github/CODEOWNERS | 2 + .github/ISSUE_TEMPLATE/template_bug.yml | 37 ++ .github/PULL_REQUEST_TEMPLATE/template_pr.yml | 39 ++ .github/dependabot.yml | 54 +++ .github/release-drafter.yml | 7 + .github/template-sync.yml | 29 ++ .github/workflows/cicd.yml | 30 ++ .github/workflows/template-sync.yml | 24 ++ .github/workflows/update-license.yml | 29 ++ .gitignore | 356 ++++++++++++++++++ .gitmodules | 4 + .vscode/extensions.json | 7 + Directory.Build.props | 12 + Directory.Build.targets | 7 + Directory.Packages.props | 29 ++ Directory.Solution.props | 10 + GitVersion.yml | 4 + LICENSE | 21 ++ README.md | 2 + eng | 1 + new-project.ps1 | 55 +++ new-solution.ps1 | 17 + nuget.config | 29 ++ update-solution.ps1 | 12 + 26 files changed, 898 insertions(+) create mode 100644 .editorconfig create mode 100644 .filenesting.json create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/template_bug.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE/template_pr.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/release-drafter.yml create mode 100644 .github/template-sync.yml create mode 100644 .github/workflows/cicd.yml create mode 100644 .github/workflows/template-sync.yml create mode 100644 .github/workflows/update-license.yml create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 .vscode/extensions.json create mode 100644 Directory.Build.props create mode 100644 Directory.Build.targets create mode 100644 Directory.Packages.props create mode 100644 Directory.Solution.props create mode 100644 GitVersion.yml create mode 100644 LICENSE create mode 100644 README.md create mode 160000 eng create mode 100644 new-project.ps1 create mode 100644 new-solution.ps1 create mode 100644 nuget.config create mode 100644 update-solution.ps1 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e0f6063 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,78 @@ +# EditorConfig is awesome: https://EditorConfig.org +# top-most EditorConfig file +root = true + +# DO NOT CHANGE SETTINGS IN THIS FILE. PLEASE CREATE PULL REQUEST IN REPOSITORY `dotnet-engineering`. + +# Don't use tabs for indentation. +[*] +insert_final_newline = true +indent_style = space +trim_trailing_whitespace = true +charset = utf-8 +end_of_line = lf + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 +insert_final_newline = true +charset = utf-8-bom + +# Razor and cshtml files +# UTF-8-BOM is set as default, as all official template files use UTF-8-BOM +# See https://github.com/dotnet/aspnetcore/pull/23502 and https://github.com/dotnet/aspnetcore/issues/22753 +[*.{razor,cshtml}] +charset = utf-8-bom + +# Generated code +[*{_AssemblyInfo.cs,.notsupported.cs,.generated.cs}] +generated_code = true + +# XML project files +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,nativeproj,locproj}] +indent_size = 2 + +# Xml build files +[*.builds] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# XML config files +[*.{props,targets,ruleset,config,nuspec,vsixmanifest,vsct}] +indent_size = 2 + +# JSON files +[*.json] +indent_size = 2 + +# YAML files +[*.{yml,yaml}] +indent_size = 2 + +# Powershell files +[*.ps1] +indent_size = 2 + +# Shell scripts +[*.sh] +indent_size = 2 + +# Commandline scripts +[*.{cmd,bat}] +end_of_line = crlf +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false +insert_final_newline = false + +# Visual Studio Solution Files +[*.sln] +indent_style = tab + +[*.{received,verified}.txt] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.filenesting.json b/.filenesting.json new file mode 100644 index 0000000..4698c7c --- /dev/null +++ b/.filenesting.json @@ -0,0 +1,3 @@ +{ + "help":"https://go.microsoft.com/fwlink/?linkid=866610" +} diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..02ec2ba --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Default owners for all projects +* @dailydevops/maintainer diff --git a/.github/ISSUE_TEMPLATE/template_bug.yml b/.github/ISSUE_TEMPLATE/template_bug.yml new file mode 100644 index 0000000..4dd41bb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/template_bug.yml @@ -0,0 +1,37 @@ +name: 🐞 Bug +description: Submit a bug report +title: "bug: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! Before submitting a `bug`, please make sure there is no existing issue for the one you encountered. + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true + - type: input + attributes: + label: Package & package version + description: Which package and version does this bug affect? + placeholder: e.g. NetEvolve.Example 1.2.3 + validations: + required: true + - type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + placeholder: The more details we have, the better we can reproduce the problem and fix it. + validations: + required: false + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + placeholder: The more details we have, the better we can reproduce the problem and fix it. + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE/template_pr.yml b/.github/PULL_REQUEST_TEMPLATE/template_pr.yml new file mode 100644 index 0000000..64cad0c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/template_pr.yml @@ -0,0 +1,39 @@ + + +## What does this PR do? + + + +## Why is it important? + + + +## Related issues + + +- + + + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..9757ef2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,54 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "build(ci)" + labels: + - "dependency-actions" + open-pull-requests-limit: 50 + + - package-ecosystem: "nuget" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "build(deps)" + labels: + - "dependency-nuget" + open-pull-requests-limit: 50 + # groups: + # coverlet: + # patterns: + # - "coverlet*" + # testcontainers: + # patterns: + # - "testcontainers*" + # verify: + # patterns: + # - "verify*" + # xunit: + # patterns: + # - "xunit" + # - "xunit*" + + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "build(mods)" + labels: + - "dependency-gitmodule" + open-pull-requests-limit: 50 + groups: + submodules: + patterns: + - "*" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..e6ae494 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,7 @@ +name-template: $RESOLVED_VERSION +tag-template: $RESOLVED_VERSION + +template: | + # What's Changed + + $CHANGES diff --git a/.github/template-sync.yml b/.github/template-sync.yml new file mode 100644 index 0000000..6265aa4 --- /dev/null +++ b/.github/template-sync.yml @@ -0,0 +1,29 @@ +additional: + - "arguments" + - "analyzer" + - "article.benchmarks" + - "describe" + - "develop" + - "extensions.strings" + - "extensions.tasks" + - "extensions.test" + - "guard" + - "healthchecks" + - "http.correlation" + - "trydispose" + +files: + - "!**/*" + - ".editorconfig" + - ".gitignore" + - ".github/CODEOWNERS" + - ".github/dependabot.yml" + - ".github/release-drafter.yml" + - ".github/ISSUE_TEMPLATE/**/*" + - ".github/PULL_REQUEST_TEMPLATE/**/*" + - ".github/workflows/update-license.yml" + + # you probably want to exclude these files: + - "!.github/workflows/dependabot-merge.yml" + - "!.github/workflows/template-sync.yml" + - "!.github/template-sync.yml" diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 0000000..82c1115 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + inputs: + dotnet-logging: + required: true + type: choice + default: minimal + options: + - quiet + - minimal + - normal + - detailed + - diagnostic + +jobs: + all: + name: Build & Tests + uses: dailydevops/pipelines/.github/workflows/cicd-dotnet.yml@main + with: + dotnet-logging: ${{ inputs.dotnet-logging }} + dotnet-version: | + 7.x + solution: ###SOLUTION### + secrets: inherit diff --git a/.github/workflows/template-sync.yml b/.github/workflows/template-sync.yml new file mode 100644 index 0000000..07adb4e --- /dev/null +++ b/.github/workflows/template-sync.yml @@ -0,0 +1,24 @@ +name: Update template files + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + template-sync: + if: github.actor != 'dependabot[bot]' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: ahmadnassri/action-template-repository-sync@v2.5.0 + with: + github-token: ${{ secrets.TEMPLATE_SYNC }} + dry-run: false + skip-ci: true diff --git a/.github/workflows/update-license.yml b/.github/workflows/update-license.yml new file mode 100644 index 0000000..6130e48 --- /dev/null +++ b/.github/workflows/update-license.yml @@ -0,0 +1,29 @@ +name: Update copyright year in license file + +on: + schedule: + - cron: '0 6 1 1 *' + workflow_dispatch: + +jobs: + run: + runs-on: ubuntu-latest + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: FantasticFiasco/action-update-license-year@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + prTitle: 'chore: Updated LICENSE' + commitTitle: 'chore: Updated LICENSE [skip ci]' + id: license + + - name: Merge PR + if: steps.license.outputs.pullRequestNumber != '' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr merge --squash --admin --delete-branch ${{ steps.license.outputs.pullRequestNumber }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..22d8228 --- /dev/null +++ b/.gitignore @@ -0,0 +1,356 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates +*.bak +*- [Bb]ackup.* + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ +[Gg]enerated/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Visual Studio Sarif directory +.sarif/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* +*.received.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..33c81aa --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "eng"] + path = eng + url = https://github.com/dailydevops/dotnet-engineering.git + update = merge diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..2fc4f1f --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "editorconfig.editorconfig", + "ms-dotnettools.csharp", + "github.vscode-github-actions" + ] +} diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..2958b68 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,12 @@ + + + + $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'eng')) + $([MSBuild]::NormalizeDirectory('$(DirEngineering)', 'settings')) + + + + + + + diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000..a54343c --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..ff6e661 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,29 @@ + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Directory.Solution.props b/Directory.Solution.props new file mode 100644 index 0000000..ae1cea1 --- /dev/null +++ b/Directory.Solution.props @@ -0,0 +1,10 @@ + + + + $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'eng')) + $([MSBuild]::NormalizeDirectory('$(DirEngineering)', 'settings')) + + + + + diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..45c48fe --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,4 @@ +mode: MainLine # Only add this if you want every version to be created automatically on your main branch. +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-]*\\))?:" \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7f390b7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023-2024 Daily DevOps & .NET + +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/README.md b/README.md new file mode 100644 index 0000000..0e844c8 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# template-dotnet +.NET template for repositories diff --git a/eng b/eng new file mode 160000 index 0000000..4b6ef52 --- /dev/null +++ b/eng @@ -0,0 +1 @@ +Subproject commit 4b6ef52264c9865f0330757dba0bc1d86fb3a58f diff --git a/new-project.ps1 b/new-project.ps1 new file mode 100644 index 0000000..fe28792 --- /dev/null +++ b/new-project.ps1 @@ -0,0 +1,55 @@ +[CmdletBinding()] +param ( + # Parameter help description + [Parameter(Mandatory = $true)] + [String] + $ProjectName, + + # Parameter help description + [Parameter(Mandatory = $false)] + [ValidateSet('Library', 'Console', 'WebApi', 'WebApp', 'Function', 'BlazorServer', 'BlazorWasm', 'RazorLibrary', 'xUnit', 'NUnit', 'MSTest', 'Benchmarks')] + [String] + $ProjectType = 'Library', + + # Parameter help description + [Parameter(Mandatory = $false)] + [String] + $Framework = 'net7.0', + + # Parameter help description + [Parameter(Mandatory = $false)] + [Switch] + $DisableTests, + + # Parameter help description + [Parameter(Mandatory = $false)] + [Switch] + $DisableUnitTests, + + # Parameter help description + [Parameter(Mandatory = $false)] + [Switch] + $DisableIntegrationTests, + + [Parameter(Mandatory = $false)] + [Switch] + $EnableProjectGrouping, + + [Parameter(Mandatory = $false)] + [Switch] + $DisableArchitectureTests +) + +. .\eng\scripts\new-project.ps1 + +New-Project ` + -ProjectName $ProjectName ` + -ProjectType $ProjectType ` + -Framework $Framework ` + -DisableTests $DisableTests ` + -DisableUnitTests $DisableUnitTests ` + -DisableIntegrationTests $DisableIntegrationTests ` + -SolutionFile "###SOLUTION###" ` + -OutputDirectory (Get-Location) ` + -EnableProjectGrouping $EnableProjectGrouping ` + -DisableArchitectureTests $DisableArchitectureTests diff --git a/new-solution.ps1 b/new-solution.ps1 new file mode 100644 index 0000000..0c57ad1 --- /dev/null +++ b/new-solution.ps1 @@ -0,0 +1,17 @@ +[CmdletBinding()] +param ( + # Name of the solution to be created. + [Parameter(Mandatory = $true)] + [string] + $SolutionName +) + +Write-Output "Updating submodules ..." +git submodule update --init --recursive --remote | Out-Null + +Write-Output "Creating $SolutionName.sln ..." +$location = Get-Location +. .\eng\scripts\new-solution.ps1 + +New-Solution -SolutionName $SolutionName -Output $location +Remove-Item -Path "$location\new-solution.ps1" -Force diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..5290396 --- /dev/null +++ b/nuget.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/update-solution.ps1 b/update-solution.ps1 new file mode 100644 index 0000000..b6f2583 --- /dev/null +++ b/update-solution.ps1 @@ -0,0 +1,12 @@ +[CmdletBinding()] +param ( +) +Write-Output "Updating submodules ..." +git submodule update --init --recursive --remote | Out-Null + +. .\eng\scripts\update-solution.ps1 + +Update-Solution -OutputDirectory (Get-Location) + +Write-Output "Reinitializing git repository ..." +git init | Out-Null