How to use gilab insted of github for building

installed go
did
go get gitlab/xxx/grafana (git repo successfully cloned )
go run build.go setup also works fine
go run build.go build but build fails with below error

cannot use commands.Commands (type []“github.com/grafana/grafana/vendor/github.com/codegangsta/cli”.Command) as type []“gitlab.com/xxx/grafana/vendor/github.com/codegangsta/cli”.Command in assignment

is there any dependency on github ?? can’t i use gitlab like this ??

Thanks
Manju

Did you solve this? Looks like you did not follow the build instructions:

http://docs.grafana.org/project/building_from_source/

No was not able to build using gitlab

i build using github and deleted git repo which is generated after doing go get github.com/grafana/grafana

then i cloned git lab repo int the same location where github repo was there

let me know if you have any inputs

Manju

It does not matter if you get the code from GitHub or Gitlab - it is a Git repo either way.

But it is important what the GOPATH is set to and what the directories are called. Some options:

  • rename your local directory to $GOPATH/src/github.com/grafana/grafana
  • or symlink it: ln -s $GOPATH/src/gitlab.com/xxx/grafana $GOPATH/src/github.com/grafana/grafana
  • don’t fetch the repo using go get - use git clone instead

P.S. Another way to do it - go get from github then just add your gitlab repo as a git remote (keeping the $GOPATH/src/github.com/grafana/grafana directory structure)

Faced the same issue, but with symlink approach it worked. Not the best though.