fix
This commit is contained in:
@@ -113,6 +113,9 @@ spec:
|
|||||||
workspace: ssh
|
workspace: ssh
|
||||||
- name: git-version
|
- name: git-version
|
||||||
runAfter: [git-clone]
|
runAfter: [git-clone]
|
||||||
|
params:
|
||||||
|
- name: branch
|
||||||
|
value: $(params.branch-name)
|
||||||
taskRef:
|
taskRef:
|
||||||
name: git-version
|
name: git-version
|
||||||
workspaces:
|
workspaces:
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ spec:
|
|||||||
default: gittools/gitversion:6.0.0-alpine.3.18-7.0
|
default: gittools/gitversion:6.0.0-alpine.3.18-7.0
|
||||||
description: The name of the toolbox image
|
description: The name of the toolbox image
|
||||||
type: string
|
type: string
|
||||||
|
- name: branch
|
||||||
|
type: string
|
||||||
results:
|
results:
|
||||||
- description: The calculated git version you could use for git tagging e.g. "0.1.0-tektonize.1-188"
|
- description: The calculated git version you could use for git tagging e.g. "0.1.0-tektonize.1-188"
|
||||||
name: gitVersion
|
name: gitVersion
|
||||||
@@ -31,8 +33,7 @@ spec:
|
|||||||
workingDir: $(workspaces.source.path)
|
workingDir: $(workspaces.source.path)
|
||||||
script: |
|
script: |
|
||||||
#!/usr/bin/env ash
|
#!/usr/bin/env ash
|
||||||
git branch
|
git checkout $(params.branch)
|
||||||
git log
|
|
||||||
ShortSha=$(/tools/dotnet-gitversion . /showvariable ShortSha)
|
ShortSha=$(/tools/dotnet-gitversion . /showvariable ShortSha)
|
||||||
echo -n "${ShortSha}" | tee $(results.shortSHA.path)
|
echo -n "${ShortSha}" | tee $(results.shortSHA.path)
|
||||||
FullSemVer=$(/tools/dotnet-gitversion . /showvariable FullSemVer)
|
FullSemVer=$(/tools/dotnet-gitversion . /showvariable FullSemVer)
|
||||||
|
|||||||
Reference in New Issue
Block a user