Skip to content

Commit

Permalink
chore: add template option for git host
Browse files Browse the repository at this point in the history
  • Loading branch information
EnisMulic committed Nov 3, 2023
1 parent e763ce2 commit 6644ce4
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 2 deletions.
Empty file added .azure/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions .template.config/dotnetcli.host.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"symbolInfo": {
"GitHost": {
"longName": "git-host",
"shortName": "gh"
}
}
}
17 changes: 17 additions & 0 deletions .template.config/ide.host.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
58 changes: 56 additions & 2 deletions .template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,67 @@
{
"$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",
"sourceName": "ProjectName",
"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/**"]
}
]
}
]
}

0 comments on commit 6644ce4

Please sign in to comment.