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 @@ -219,7 +219,12 @@ func (pushService *pushService) pushGit(repository *github.Repository, initialPu
219219 }
220220 initialRefSpecs := []config.RefSpec {}
221221 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 ()))
223228 }
224229 refSpecBatches = append (refSpecBatches , initialRefSpecs )
225230 } else {
You can’t perform that action at this time.
0 commit comments