Permalink
Browse files

switch external dependencies to standard import paths; turn on travis…

…-ci builds
  • Loading branch information...
1 parent fb5ec28 commit b094d7ac50f8eb095c2ae6d57c8369820beac4a6 @jehiah jehiah committed Sep 28, 2012
Showing with 31 additions and 23 deletions.
  1. +8 −0 .travis.yml
  2. +7 −17 INSTALLING.md
  3. +2 −0 README.md
  4. +1 −1 nsq/reader.go
  5. +1 −1 nsq/reader_test.go
  6. +1 −1 nsqd/channel.go
  7. +1 −1 nsqd/lookup.go
  8. +1 −1 nsqd/topic.go
  9. +8 −0 test.sh
  10. +1 −1 util/api_request.go
View
@@ -0,0 +1,8 @@
+language: go
+install:
+ - go get github.com/bmizerany/assert
+ - go get github.com/bitly/go-notify
+ - go get github.com/bitly/go-simplejson
+script: ./test.sh
+notifications:
+ email: false
View
@@ -1,24 +1,12 @@
# Pre-requisites
-**install-as** https://github.com/mreiferson/go-install-as
-
- $ git clone git://github.com/mreiferson/go-install-as.git
- $ cd $REPO
- $ make
-
**simplejson** https://github.com/bitly/go-simplejson
- # installed under a custom import path so you can control versioning
- $ git clone git://github.com/bitly/go-simplejson.git
- $ cd $REPO
- $ go tool install_as --import-as=bitly/simplejson
+ $ go get github.com/bitly/go-simplejson
**notify** https://github.com/bitly/go-notify
- # installed under a custom import path so you can control versioning
- $ git clone git://github.com/bitly/go-notify.git
- $ cd $REPO
- $ go tool install_as --import-as=bitly/notify
+ $ go get github.com/bitly/go-notify
**assert** https://github.com/bmizerany/assert
@@ -28,14 +16,16 @@
Binaries (`nsqd`, `nsqlookupd`, `nsqadmin`, and all example apps)
- $ git clone git://github.com/bitly/nsq.git
+Note: Binaries can not be built from within $GOPATH because of relative imports. To build, checkout to a directory
+outside of $GOPATH
+
+ $ git clone https://github.com/bitly/nsq.git
$ cd $REPO
$ ./install.sh
Go package (for building Go readers)
- $ cd $REPO/nsq
- $ go tool install_as --import-as=bitly/nsq
+ $ go get github.com/bitly/nsq/nsq
Python module (for building Python readers)
View
@@ -10,6 +10,8 @@ line and compiled binaries have no runtime dependencies). For maximum flexibilit
data format (messages can be JSON, [MsgPack][msgpack], [Protocol Buffers][go-protobuf], or anything else). Go and
Python libraries are available out of the box and, if you're interested in building your own client, there's a [protocol spec][protocol].
+[![Build Status](https://secure.travis-ci.org/bitly/nsq.png)](http://travis-ci.org/bitly/nsq)
+
**NSQ** was built as a successor to [simplequeue][simplequeue] (part of [simplehttp][simplehttp]) and as
such was designed to (in no particular order):
View
@@ -1,10 +1,10 @@
package nsq
import (
- "bitly/simplejson"
"bytes"
"errors"
"fmt"
+ "github.com/bitly/go-simplejson"
"io/ioutil"
"log"
"math"
View
@@ -1,10 +1,10 @@
package nsq
import (
- "bitly/simplejson"
"bytes"
"errors"
"fmt"
+ "github.com/bitly/go-simplejson"
"io/ioutil"
"log"
"net/http"
View
@@ -4,10 +4,10 @@ import (
"../nsq"
"../util"
"../util/pqueue"
- "bitly/notify"
"bytes"
"container/heap"
"errors"
+ "github.com/bitly/go-notify"
"log"
"strings"
"sync"
View
@@ -2,9 +2,9 @@ package main
import (
"../nsq"
- "bitly/notify"
"bytes"
"encoding/json"
+ "github.com/bitly/go-notify"
"log"
"net"
"os"
View
@@ -4,9 +4,9 @@ import (
"../nsq"
"../util"
"../util/pqueue"
- "bitly/notify"
"bytes"
"errors"
+ "github.com/bitly/go-notify"
"log"
"sync"
"sync/atomic"
View
@@ -2,6 +2,13 @@
set -e
# a helper script to run tests in the appropriate directories
+if [ "$HOME" == "/home/travis" ]; then
+ echo "moving back to build path, and removing checkout in GOPATH"
+ echo "this is because nsq uses relative imports, and that precludes building in $GOPATH"
+ GITHUB_USER=$(pwd | awk -F/ '{print $(NF-1)}')
+ cd ~/builds/$GITHUB_USER/nsq
+fi
+
for dir in nsqd nsqlookupd util/pqueue; do
echo "testing $dir"
pushd $dir >/dev/null
@@ -12,6 +19,7 @@ done
pushd nsqd >/dev/null
go build
rm -f *.dat
+echo "starting nsqd --data-path=/tmp"
./nsqd --data-path=/tmp >/dev/null 2>&1 &
PID=$!
View
@@ -1,9 +1,9 @@
package util
import (
- "bitly/simplejson"
"errors"
"fmt"
+ "github.com/bitly/go-simplejson"
"io/ioutil"
"net"
"net/http"

0 comments on commit b094d7a

Please sign in to comment.