Skip to content

Commit ab97a14

Browse files
authored
Merge pull request #26 from per1234/short-tags
Use short tag names in logs
2 parents ed5781d + 1e1dcca commit ab97a14

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

libraries/repoclone.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"io/ioutil"
2828
"os"
2929
"path/filepath"
30-
"strings"
3130

3231
"arduino.cc/repository/libraries/db"
3332

@@ -75,7 +74,7 @@ func CloneOrFetch(repoMeta *Repo, folderName string) (*Repository, error) {
7574
break
7675
}
7776

78-
if err = repo.Repository.DeleteTag(strings.TrimPrefix(tag.Name().String(), "refs/tags/")); err != nil {
77+
if err = repo.Repository.DeleteTag(tag.Name().Short()); err != nil {
7978
return nil, err
8079
}
8180
}

sync_libraries.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func syncLibraryTaggedRelease(logger *log.Logger, repo *libraries.Repository, ta
252252
var releaseLog string // This string will be displayed in the logs for indexed releases.
253253

254254
// Checkout desired tag
255-
logger.Printf("Checking out tag: %s", tag.Name())
255+
logger.Printf("Checking out tag: %s", tag.Name().Short())
256256

257257
repoTree, err := repo.Repository.Worktree()
258258
if err != nil {

0 commit comments

Comments
 (0)