From 6644ce41167b43498bbc712ec344f4bb14fa2373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Muli=C4=87?= Date: Fri, 3 Nov 2023 08:04:36 +0100 Subject: [PATCH] chore: add template option for git host --- .azure/.gitkeep | 0 .template.config/dotnetcli.host.json | 8 ++++ .template.config/ide.host.json | 17 ++++++++ .template.config/template.json | 58 +++++++++++++++++++++++++++- 4 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 .azure/.gitkeep create mode 100644 .template.config/dotnetcli.host.json create mode 100644 .template.config/ide.host.json diff --git a/.azure/.gitkeep b/.azure/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.template.config/dotnetcli.host.json b/.template.config/dotnetcli.host.json new file mode 100644 index 0000000..5661484 --- /dev/null +++ b/.template.config/dotnetcli.host.json @@ -0,0 +1,8 @@ +{ + "symbolInfo": { + "GitHost": { + "longName": "git-host", + "shortName": "gh" + } + } +} diff --git a/.template.config/ide.host.json b/.template.config/ide.host.json new file mode 100644 index 0000000..1183c66 --- /dev/null +++ b/.template.config/ide.host.json @@ -0,0 +1,17 @@ +{ + "$schema": "http://json.schemastore.org/vs-2017.3.host", + "order": 0, + "icon": "icon.png", + "symbolInfo": [ + { + "id": "GitHost", + "name": { + "text": "Git Repository Host" + }, + "description": { + "text": "Select the git respository host" + }, + "isVisible": true + } + ] +} diff --git a/.template.config/template.json b/.template.config/template.json index ac6e318..ee58159 100644 --- a/.template.config/template.json +++ b/.template.config/template.json @@ -1,7 +1,7 @@ { "$schema": "http://json.schemastore.org/template", "author": "Enis Mulic", - "classifications": ["Api"], + "classifications": ["Api", "Minimal Api", "Vertical Slice Architecture", "CQRS"], "identity": "VerticalSliceMinimalApi", "name": "Vertical Slice Minimal Api", "shortName": "vsma", @@ -9,5 +9,59 @@ "tags": { "language": "C#", "type": "project" - } + }, + "symbols": { + "GitHost": { + "type": "parameter", + "datatype": "choice", + "choices": [ + { + "choice": "Github", + "description": "Use Github" + }, + { + "choice": "Azure", + "description": "Use Azure DevOps" + }, + { + "choice": "None", + "description": "" + } + ], + "defaultValue": "Github", + "description": "The type of git host to use" + }, + "UseGithub": { + "type": "computed", + "value": "(GitHost == \"Github\")" + }, + "UseAzureDevOps": { + "type": "computed", + "value": "(GitHost == \"Azure\")" + }, + "UseNoGitHost": { + "type": "computed", + "value": "(GitHost == \"None\")" + } + }, + "sources": [ + { + "source": "./", + "target": "./", + "modifiers": [ + { + "condition": "(UseGithub)", + "exclude": [".azure/**"] + }, + { + "condition": "(UseAzureDevOps)", + "exclude": [".github/**"] + }, + { + "condition": "(UseNoGitHost)", + "exclude": [".azure/**", ".github/**"] + } + ] + } + ] }