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