Refresh tags each time the publish script is run

This commit is contained in:
Dan Hawkins 2022-03-26 09:35:28 +00:00
commit ec6b507d4b
2 changed files with 8 additions and 0 deletions

View file

@ -54,6 +54,7 @@ pipeline {
script {
rt = load("${autobuilder.commonscripts()}/release/tag.groovy")
gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy")
gh.refreshtags()
def allreleases = gh.gettaglist(SOURCEDIR)
def releases = new ArrayList<String>()
for (release in allreleases) {

View file

@ -25,6 +25,13 @@ String getGitInfo(String workingSetRootPath) {
}
}
def refreshtags(String workingSetRootPath) {
dir(workingSetRootPath) {
echo "${clh.getCommandOutput('git tag | xargs git tag -d')}"
echo "${clh.getCommandOutput('git fetch --tags)}"
}
}
ArrayList<String> gettaglist(String workingSetRootPath) {
ArrayList<String> taglist = new ArrayList<String>()
dir(workingSetRootPath) {