From ec6b507d4bab18dbaa36e7d8bb9eb6efaced06af Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 26 Mar 2022 09:35:28 +0000 Subject: [PATCH] Refresh tags each time the publish script is run --- publish/promptingpublish.groovy | 1 + versioncontrol/git.groovy | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 49d9421..3c9afe5 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -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() for (release in allreleases) { diff --git a/versioncontrol/git.groovy b/versioncontrol/git.groovy index 2b6fb09..ca5415e 100644 --- a/versioncontrol/git.groovy +++ b/versioncontrol/git.groovy @@ -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 gettaglist(String workingSetRootPath) { ArrayList taglist = new ArrayList() dir(workingSetRootPath) {