git-gitlab icon indicating copy to clipboard operation
git-gitlab copied to clipboard

Add build instructions

Open voidus opened this issue 10 years ago • 1 comments

I'm trying to package this for archlinux, and as I'm not familiar with go, I'm having some difficulties building it.

Step-by-step instructions on how to install dependencies and build the project would be really great!

voidus avatar May 20 '15 10:05 voidus

Ok.First, You install go-lang, set environment variable 'GOPATH' and clone this repository to $GOPATH/src/github.com/numa08/git-gitlab.

Second, you should show .travis.yml. .travis.yml is a configuration file for travis-ci. This file is written build script. I believe this file help you.

Third, you install libgit2. libgit2 is a library. Sorry, I didn't try on archlinux, on ubuntu run below command.

$ wget -O libgit2-0.22.1.tar.gz https://github.com/libgit2/libgit2/archive/v0.22.1.tar.gz
$ tar -xzvf libgit2-0.22.1.tar.gz
$ cd libgit2-0.22.1 && mkdir build && cd build
$ cmake -DTHREADSAFE=ON -DBUILD_CLAR=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX=/usr/local .. && make && sudo make install
$ sudo ldconfig

Fourth, you install go-lang libraries. There are libgit2/git2go and plouc/go-gitlab-client.

$ go get gopkg.in/libgit2/git2go.v22
$ go get github.com/plouc/go-gitlab-client

Last, make this tool.

$ cd $GOPATH/src/github.com/numa08/git-gitlab
$ make build

That command will create build/git-lab, so you move to somewhere where is inside $PATH.And run git lab.

If, you success build then please update README.md and send pull-request. Good luck!

numa08 avatar May 20 '15 13:05 numa08