File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,12 @@ func (pushService *pushService) pushGit(repository *github.Repository, initialPu
215
215
}
216
216
initialRefSpecs := []config.RefSpec {}
217
217
for _ , releasePathStat := range releasePathStats {
218
- initialRefSpecs = append (initialRefSpecs , config .RefSpec ("+refs/tags/" + releasePathStat .Name ()+ ":refs/tags/" + releasePathStat .Name ()))
218
+ tagReferenceName := plumbing .NewTagReferenceName (releasePathStat .Name ())
219
+ _ , err := gitRepository .Reference (tagReferenceName , true )
220
+ if err != nil {
221
+ return errors .Wrapf (err , "Error finding local tag reference %s." , tagReferenceName )
222
+ }
223
+ initialRefSpecs = append (initialRefSpecs , config .RefSpec ("+" + tagReferenceName .String ()+ ":" + tagReferenceName .String ()))
219
224
}
220
225
refSpecBatches = append (refSpecBatches , initialRefSpecs )
221
226
} else {
You can’t perform that action at this time.
0 commit comments