Revert "Merge pull request #814 from GitTools/feature/691"

This reverts commit 20cee55108.
This commit is contained in:
Artur
2023-03-11 06:17:42 +01:00
parent 20cee55108
commit ae4777b171
56 changed files with 429 additions and 644 deletions

File diff suppressed because one or more lines are too long

View File

@@ -21,54 +21,47 @@
}
},
"instanceNameFormat": "gitreleasemanager/addasset",
"inputs": [
{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
},
{
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
},
{
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
},
{
"name": "tagName",
"type": "string",
"label": "The name of the release",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the release"
},
{
"name": "assets",
"type": "multiLine",
"label": "Path(s) to the file(s) to include in the release",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path(s) to the file(s) to include in the release. Separated by newline"
},
{
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}
]
"inputs": [{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
}, {
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
}, {
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
}, {
"name": "tagName",
"type": "string",
"label": "The name of the release",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the release"
}, {
"name": "assets",
"type": "multiLine",
"label": "Path(s) to the file(s) to include in the release",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path(s) to the file(s) to include in the release. Separated by newline"
}, {
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}]
}

File diff suppressed because one or more lines are too long

View File

@@ -21,46 +21,40 @@
}
},
"instanceNameFormat": "gitreleasemanager/close",
"inputs": [
{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
},
{
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
},
{
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
},
{
"name": "milestone",
"type": "string",
"label": "The milestone to use",
"defaultValue": "",
"required": true,
"helpMarkDown": "The milestone to use"
},
{
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}
]
"inputs": [{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
}, {
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
}, {
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
}, {
"name": "milestone",
"type": "string",
"label": "The milestone to use",
"defaultValue": "",
"required": true,
"helpMarkDown": "The milestone to use"
}, {
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}]
}

File diff suppressed because one or more lines are too long

View File

@@ -21,86 +21,75 @@
}
},
"instanceNameFormat": "gitreleasemanager/create",
"inputs": [
{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
},
{
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
},
{
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
},
{
"name": "milestone",
"type": "string",
"label": "The milestone to use",
"defaultValue": "",
"required": false,
"helpMarkDown": "The milestone to use"
},
{
"name": "name",
"type": "string",
"label": "The name of the release",
"defaultValue": "",
"required": false,
"helpMarkDown": "The name of the release"
},
{
"name": "inputFilePath",
"type": "string",
"label": "The path to the file to be used as the content of the release notes",
"defaultValue": "",
"required": false,
"helpMarkDown": "The path to the file to be used as the content of the release notes"
},
{
"name": "isPreRelease",
"type": "boolean",
"label": "Creates the release as a pre-release",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Creates the release as a pre-release"
},
{
"name": "targetcommitish",
"type": "string",
"label": "The commit to tag. Can be a branch or SHA. Defaults to repository's default branch",
"defaultValue": "",
"required": false,
"helpMarkDown": "The commit to tag. Can be a branch or SHA. Defaults to repository's default branch"
},
{
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
},
{
"name": "assets",
"type": "multiLine",
"label": "Path(s) to the file(s) to include in the release",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path(s) to the file(s) to include in the release. Separated by newline"
}
]
"inputs": [{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
}, {
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
}, {
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
}, {
"name": "milestone",
"type": "string",
"label": "The milestone to use",
"defaultValue": "",
"required": false,
"helpMarkDown": "The milestone to use"
}, {
"name": "name",
"type": "string",
"label": "The name of the release",
"defaultValue": "",
"required": false,
"helpMarkDown": "The name of the release"
}, {
"name": "inputFilePath",
"type": "string",
"label": "The path to the file to be used as the content of the release notes",
"defaultValue": "",
"required": false,
"helpMarkDown": "The path to the file to be used as the content of the release notes"
}, {
"name": "isPreRelease",
"type": "boolean",
"label": "Creates the release as a pre-release",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Creates the release as a pre-release"
}, {
"name": "targetcommitish",
"type": "string",
"label": "The commit to tag. Can be a branch or SHA. Defaults to repository's default branch",
"defaultValue": "",
"required": false,
"helpMarkDown": "The commit to tag. Can be a branch or SHA. Defaults to repository's default branch"
}, {
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}, {
"name": "assets",
"type": "multiLine",
"label": "Path(s) to the file(s) to include in the release",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path(s) to the file(s) to include in the release. Separated by newline"
}]
}

File diff suppressed because one or more lines are too long

View File

@@ -21,46 +21,40 @@
}
},
"instanceNameFormat": "gitreleasemanager/discard",
"inputs": [
{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
},
{
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
},
{
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
},
{
"name": "milestone",
"type": "string",
"label": "The milestone to use",
"defaultValue": "",
"required": true,
"helpMarkDown": "The milestone to use"
},
{
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}
]
"inputs": [{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
}, {
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
}, {
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
}, {
"name": "milestone",
"type": "string",
"label": "The milestone to use",
"defaultValue": "",
"required": true,
"helpMarkDown": "The milestone to use"
}, {
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}]
}

File diff suppressed because one or more lines are too long

View File

@@ -21,46 +21,40 @@
}
},
"instanceNameFormat": "gitreleasemanager/open",
"inputs": [
{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
},
{
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
},
{
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
},
{
"name": "milestone",
"type": "string",
"label": "The milestone to use",
"defaultValue": "",
"required": true,
"helpMarkDown": "The milestone to use"
},
{
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}
]
"inputs": [{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
}, {
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
}, {
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
}, {
"name": "milestone",
"type": "string",
"label": "The milestone to use",
"defaultValue": "",
"required": true,
"helpMarkDown": "The milestone to use"
}, {
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}]
}

File diff suppressed because one or more lines are too long

View File

@@ -21,46 +21,40 @@
}
},
"instanceNameFormat": "gitreleasemanager/publish",
"inputs": [
{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
},
{
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
},
{
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
},
{
"name": "tagName",
"type": "string",
"label": "The name of the release",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the release"
},
{
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}
]
"inputs": [{
"name": "owner",
"type": "string",
"label": "The owner of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The owner of the repository"
}, {
"name": "repository",
"type": "string",
"label": "The name of the repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the repository"
}, {
"name": "token",
"type": "string",
"label": "The access token to access GitHub with",
"defaultValue": "",
"required": true,
"helpMarkDown": "The access token to access GitHub with"
}, {
"name": "tagName",
"type": "string",
"label": "The name of the release",
"defaultValue": "",
"required": true,
"helpMarkDown": "The name of the release"
}, {
"name": "targetDirectory",
"type": "string",
"label": "The directory on which GitReleaseManager should be executed. Defaults to current directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "The directory on which GitReleaseManager should be executed. Defaults to current directory"
}]
}

File diff suppressed because one or more lines are too long

View File

@@ -21,8 +21,7 @@
}
},
"instanceNameFormat": "gitreleasemanager/setup",
"inputs": [
{
"inputs": [{
"name": "versionSpec",
"type": "string",
"label": "The version spec",
@@ -45,14 +44,6 @@
"defaultValue": "false",
"required": false,
"helpMarkDown": "Treat package source failures as warnings"
},
{
"name": "preferLatestVersion",
"type": "boolean",
"label": "Prefer latest version",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Prefer to download the latest version matching the versionSpec, even if there is a local cached version."
}
]
}

File diff suppressed because one or more lines are too long

View File

@@ -21,8 +21,7 @@
}
},
"instanceNameFormat": "gitversion/execute",
"groups": [
{
"groups": [{
"name": "gitversionDetails",
"displayName": "GitVersion details",
"isExpanded": true
@@ -33,8 +32,7 @@
"isExpanded": false
}
],
"inputs": [
{
"inputs": [{
"name": "targetPath",
"type": "string",
"label": "Working directory path",

File diff suppressed because one or more lines are too long

View File

@@ -21,8 +21,7 @@
}
},
"instanceNameFormat": "gitversion/setup",
"inputs": [
{
"inputs": [{
"name": "versionSpec",
"type": "string",
"label": "The version spec",
@@ -45,14 +44,6 @@
"defaultValue": "false",
"required": false,
"helpMarkDown": "Treat package source failures as warnings"
},
{
"name": "preferLatestVersion",
"type": "boolean",
"label": "Prefer latest version",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Prefer to download the latest version matching the versionSpec, even if there is a local cached version."
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- task: gitreleasemanager/close@0
- task: gitreleasemanager/close@0
inputs:
token: '$(GITHUB_TOKEN)'
owner: 'someOwner'

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- task: gitreleasemanager/open@0
- task: gitreleasemanager/open@0
inputs:
token: '$(GITHUB_TOKEN)'
owner: 'someOwner'

View File

@@ -226,19 +226,18 @@ steps:
Calculate the version for the build and use the `GitVersion.BranchName` variable in a condition for starting another job.
```yaml
jobs:
- job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
- job: CreateReleaseNotes
condition: and(succeeded(), eq(dependencies.CalculateVersion.outputs['Version.GitVersion.BranchName'], 'main'))
dependsOn: CalculateVersion
job: CreateReleaseNotes
condition: and(succeeded(), eq(dependencies.CalculateVersion.outputs['Version.GitVersion.BranchName'], 'main'))
dependsOn: CalculateVersion
```
### Example 8
@@ -246,19 +245,18 @@ jobs:
Calculate the version for the build and map the `GitVersion.SemVer` variable into a variable in another job.
```yaml
jobs:
- job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
job: CalculateVersion
displayName: Calculate version using GitVersion
steps:
# gitversion/setup@0 task omitted for brevity.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
- task: gitversion/execute@0
displayName: Use GitVersion
name: Version # the step MUST be named to access its output variables in another job.
- job: BuildAndPack
variables:
Ver.MajorMinorPatch: $[ dependencies.CalculateVersion.outputs['Version.GitVersion.MajorMinorPatch'] ]
job: BuildAndPack
variables:
Ver.MajorMinorPatch: $[ dependencies.CalculateVersion.outputs['Version.GitVersion.MajorMinorPatch'] ]
```
### Example 9

View File

@@ -21,10 +21,6 @@ ignoreFailedSources:
description: Treat package source failures as warnings.
required: false
default: false
preferLatestVersion:
description: Prefer to download the latest version matching the versionSpec, even if there is a local cached version.
required: false
default: 'false'
```
---
@@ -67,16 +63,3 @@ steps:
versionSpec: '6.x'
includePrerelease: true
```
### Example 4
Install the latest GitVersion 5 version even it there is a cached version matching the versionSpec.
```yaml
steps:
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: '5.x'
preferLatestVersion: true
```

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- uses: gittools/actions/gitreleasemanager/addassetv0
- uses: gittools/actions/gitreleasemanager/addasset@v0.9.2
name: Add asset to a release with GitReleaseManager
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- uses: gittools/actions/gitreleasemanager/closev0
- uses: gittools/actions/gitreleasemanager/close@v0.9.2
name: Close release with GitReleaseManager
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- uses: gittools/actions/gitreleasemanager/createv0
- uses: gittools/actions/gitreleasemanager/create@v0.9.2
name: Create release with GitReleaseManager
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- uses: gittools/actions/gitreleasemanager/discardv0
- uses: gittools/actions/gitreleasemanager/discard@v0.9.2
name: Discard release with GitReleaseManager
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- uses: gittools/actions/gitreleasemanager/openv0
- uses: gittools/actions/gitreleasemanager/open@v0.9.2
name: Open release with GitReleaseManager
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- uses: gittools/actions/gitreleasemanager/publishv0
- uses: gittools/actions/gitreleasemanager/publish@v0.9.2
name: Publish release with GitReleaseManager
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,7 @@
```yaml
steps:
- uses: gittools/actions/gitreleasemanager/setupv0
- uses: gittools/actions/gitreleasemanager/setup@v0.9.2
name: Install GitReleaseManager
with:
versionSpec: '0.10.x'

View File

@@ -100,10 +100,10 @@ Calculate the version for the build.
```yaml
steps:
# gitversion/setup@v0 action omitted for brevity.
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v0.9.7
```
### Example 2
@@ -113,7 +113,7 @@ Calculate the version for the build using a config file with the default name **
```yaml
steps:
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
```
@@ -135,10 +135,10 @@ Calculate the version for the build using a config file named **VersionConfig.ym
```yaml
steps:
# gitversion/setup@v0 action omitted for brevity.
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
configFilePath: VersionConfig.yml
@@ -150,10 +150,10 @@ Show the effective configuration for GitVersion by running the **/showConfig** c
```yaml
steps:
# gitversion/setup@v0 action omitted for brevity.
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Display GitVersion config
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
additionalArguments: '/showConfig'
@@ -165,11 +165,11 @@ Calculate the version for the build and display all the calculated variables in
```yaml
steps:
# gitversion/setup@v0 action omitted for brevity.
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v0.9.7
- name: Display GitVersion outputs
run: |
@@ -213,10 +213,10 @@ Calculate the version for the build and display the value of the `GITVERSION_SEM
```yaml
steps:
# gitversion/setup@v0 action omitted for brevity.
# gitversion/setup@v0.9.7 action omitted for brevity.
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v0.9.7
- name: Display SemVer
run: |
@@ -239,7 +239,7 @@ jobs:
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v0.9.7
create-release-notes:
name: Create Release Notes
@@ -268,7 +268,7 @@ jobs:
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v0.9.7
display-semver:
name: Display Semantic Version

View File

@@ -34,7 +34,7 @@ Install the latest GitVersion 5 version.
```yaml
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
```
@@ -46,7 +46,7 @@ Install GitVersion 5.5.0.
```yaml
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.5.0'
```
@@ -58,21 +58,8 @@ Install the latest GitVersion 6 pre-release version. For example **6.0.0-beta1.
```yaml
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '6.x'
includePrerelease: true
```
### Example 4
Install the latest GitVersion 5 version even it there is a cached version matching the versionSpec.
```yaml
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
preferLatestVersion: true
```

View File

@@ -20,7 +20,3 @@ inputs:
description: Treat package source failures as warnings.
required: false
default: 'false'
preferLatestVersion:
description: Prefer to download the latest version matching the versionSpec, even if there is a local cached version.
required: false
default: 'false'

View File

@@ -20,7 +20,3 @@ inputs:
description: Treat package source failures as warnings.
required: false
default: 'false'
preferLatestVersion:
description: Prefer to download the latest version matching the versionSpec, even if there is a local cached version.
required: false
default: 'false'

View File

@@ -4,13 +4,13 @@ import * as path from 'path'
import * as http from 'typed-rest-client/HttpClient'
import { inject, injectable } from 'inversify'
import { IBuildAgent, IExecResult, TYPES } from './models'
import { TYPES, IExecResult, IBuildAgent } from './models'
import { IVersionManager } from './versionManager'
import { ISetupSettings } from '../tools/common/models'
export interface IDotnetTool {
disableTelemetry(): void
toolInstall(toolName: string, setupSettings: ISetupSettings): Promise<string>
toolInstall(toolName: string, checkLatest: boolean, setupSettings: ISetupSettings): Promise<string>
}
@injectable()
@@ -37,14 +37,13 @@ export class DotnetTool implements IDotnetTool {
return this.buildAgent.exec(cmd, args)
}
public async toolInstall(toolName: string, setupSettings: ISetupSettings): Promise<string> {
public async toolInstall(toolName: string, checkLatest: boolean, setupSettings: ISetupSettings): Promise<string> {
console.log('')
console.log('--------------------------')
console.log(`Acquiring ${toolName} version spec: ${setupSettings.versionSpec}`)
console.log('--------------------------')
let version: string
let checkLatest = setupSettings.preferLatestVersion
if (this.versionManager.isExplicitVersion(setupSettings.versionSpec)) {
checkLatest = false // check latest doesn't make sense when explicit version
version = setupSettings.versionSpec

View File

@@ -1,15 +1,13 @@
export enum SetupFields {
includePrerelease = 'includePrerelease',
versionSpec = 'versionSpec',
ignoreFailedSources = 'ignoreFailedSources',
preferLatestVersion = 'preferLatestVersion'
ignoreFailedSources = 'ignoreFailedSources'
}
export interface ISetupSettings {
[SetupFields.versionSpec]: string
[SetupFields.includePrerelease]: boolean
[SetupFields.ignoreFailedSources]: boolean
[SetupFields.preferLatestVersion]: boolean
}
export interface ISettingsProvider {

View File

@@ -10,13 +10,11 @@ export class SettingsProvider implements ISettingsProvider {
const versionSpec = this.buildAgent.getInput(SetupFields.versionSpec)
const includePrerelease = this.buildAgent.getBooleanInput(SetupFields.includePrerelease)
const ignoreFailedSources = this.buildAgent.getBooleanInput(SetupFields.ignoreFailedSources)
const preferLatestVersion = this.buildAgent.getBooleanInput(SetupFields.preferLatestVersion)
return {
versionSpec,
includePrerelease,
ignoreFailedSources,
preferLatestVersion
ignoreFailedSources
}
}
}

View File

@@ -33,7 +33,7 @@ export class GitReleaseManagerTool extends DotnetTool implements IGitReleaseMana
}
public async install(setupSettings: ISetupSettings): Promise<void> {
await this.toolInstall('GitReleaseManager.Tool', setupSettings)
await this.toolInstall('GitReleaseManager.Tool', false, setupSettings)
}
public create(settings: GitReleaseManagerCreateSettings): Promise<IExecResult> {

View File

@@ -18,7 +18,7 @@ export class GitVersionTool extends DotnetTool implements IGitVersionTool {
}
public async install(setupSettings: ISetupSettings): Promise<void> {
await this.toolInstall('GitVersion.Tool', setupSettings)
await this.toolInstall('GitVersion.Tool', false, setupSettings)
}
public run(options: GitVersionSettings): Promise<IExecResult> {
@@ -149,7 +149,7 @@ export class GitVersionTool extends DotnetTool implements IGitVersionTool {
}
private toCamelCase(input: string): string {
return input.replace(/^\w|[A-Z]|\b\w|\s+/g, function (match, index) {
return input.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function (match, index) {
if (+match === 0) return '' // or if (/\s+/.test(match)) for white spaces
return index == 0 ? match.toLowerCase() : match.toUpperCase()
})