Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Commit

Permalink
build: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
AkihiroSuda committed Sep 2, 2016
1 parent 13a2bcf commit 1903d46
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ script:
- gover
- goveralls -coverprofile=gover.coverprofile -service=travis-ci
# Test some trivial things
- go vet ./...
- go fmt ./...
- go vet ./nmz/...
- go fmt ./nmz/...
# Test the entire Dockerfile
- docker build -t osrg/namazu .

Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ RUN chmod +x /usr/local/bin/pipework
## (Optional) Create a user for nfqueue sandbox
RUN useradd -m nfqhooked

## Copy Namazu to /namazu
ADD . /namazu
WORKDIR /namazu
## Copy Namazu to $GOPATH/src/github.com/osrg/namazu
RUN mkdir -p $GOPATH/src/github.com/osrg
ADD . $GOPATH/src/github.com/osrg/namazu
WORKDIR $GOPATH/src/github.com/osrg/namazu
RUN ( git submodule init && git submodule update )
ENV PYTHONPATH /namazu:$PYTHONPATH
ENV PYTHONPATH $GOPATH/src/github.com/osrg/namazu:$PYTHONPATH

## Build Namazu
RUN ./build
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,14 @@ To be documented
We welcome your contribution to Namazu.
Please feel free to send your pull requests on github!

$ git clone https://github.com/osrg/namazu.git
$ cd $GOPATH/src/github.com/osrg
$ git clone https://github.com/YOUR_GITHUB_ACCOUNT/namazu.git
$ cd namazu
$ git checkout -b your-branch
$ ./build
$ your-editor foo.go
$ ./clean && ./build && go test -race ./...
$ git commit -a -s
$ ./build
$ your-editor foo.go
$ ./clean && ./build && go test -race ./nmz/...
$ git commit -a -s

## Copyright
Copyright (C) 2015 [Nippon Telegraph and Telephone Corporation](http://www.ntt.co.jp/index_e.html).
Expand Down
5 changes: 0 additions & 5 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ function INFO(){
########## Set up ##########
cd $(dirname $0)
[ -z $GOPATH ] && (echo "GOPATH is not set"; exit 1)
[[ $GOPATH = $(pwd)* ]] && (echo "GOPATH(${GOPATH}) should be *outside* of $(pwd). otherwise some tools like IntelliJ can get stuck."; exit 1)
export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$PATH
mkdir -p $GOPATH/src/github.com/osrg
rm -f $GOPATH/src/github.com/osrg/namazu
INFO "Linking $(pwd) to $GOPATH/src/github.com/osrg/namazu"
ln -sf $(pwd) $GOPATH/src/github.com/osrg/namazu

########## ProtocolBuffers ##########
INFO "Installing protoc to $GOBIN"
Expand Down
3 changes: 2 additions & 1 deletion misc/docker/nmz-init.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ def get_remaining_args():
else:
log('Running without privileged mode. Please set NMZ_DOCKER_PRIVILEGED if you want to use Ethernet Inspector')

log('Namazu is installed on /namazu. Please refer to /namazu/README.md')
log('Namazu is installed on $GOPATH/src/github.com/osrg/namazu. Please refer to namazu/README.md')
run_command_and_exit(com + get_remaining_args())

0 comments on commit 1903d46

Please sign in to comment.