pkg / rock

Create semantic version tags for your Go packages, search and discover new packages
Apache License 2.0
50 stars 8 forks source link

Build failure upon go get for rock #9

Closed philoserf closed 6 years ago

philoserf commented 6 years ago

What happened: Upon trying go get github.com/pkg/rock received the error message

# github.com/pkg/rock/cmd
cmd/tag.go:23:2: git redeclared as imported package name
    previous declaration at cmd/tag.go:21:2
cmd/tag.go:132:17: repo.GetBranchCommitID undefined (type *"github.com/gogits/git".Repository has no field or method GetBranchCommitID)

Expected: A clean result with a $GOPATH/bin/rock.

Alternatively: If not intending use from master then a compiled binary with the GitHub release.

go env

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/[[redacted]]/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dd/9lyxqdw14vg7zk1m7_vg0_hh0000gn/T/go-build453521229=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

os ver

ProductName:    Mac OS X
ProductVersion: 10.13.1
BuildVersion:   17B48
philoserf commented 6 years ago

Indeed two imports for git in tags.

tags.go line 21: "code.gitea.io/git" tags.go line 23: "github.com/gogits/git"

bketelsen commented 6 years ago

thanks for the issue and fixing PR. That's OSS at its finest :)

philoserf commented 6 years ago

It isn't a perfect fix. I wasn't sure of the intent INRE the second git library. Still. Glad to help.