Skip to content

Commit

Permalink
fix some cross-compile issues from linux, touch up README
Browse files Browse the repository at this point in the history
  • Loading branch information
markrechler committed May 6, 2015
1 parent 0c1b556 commit 3c1be7f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,38 @@ Supports
* Gauges (including relative operations)
* Sets

Note: Only integers are supported for metric values.

[![Build Status](https://secure.travis-ci.org/bitly/statsdaemon.png)](http://travis-ci.org/bitly/statsdaemon)

Installing
==========

```bash
go get github.com/bitly/statsdaemon
You can download either pre-compiled binaries or the source of the latest [release](https://github.com/bitly/statsdaemon/releases).

Binary Example:
```
wget 'https://github.com/bitly/statsdaemon/releases/download/v0.6-alpha/statsdaemon-0.6-alpha.linux-amd64.go1.3.tar.gz'
tar xpf statsdaemon-0.6-alpha.linux-amd64.go1.3.tar.gz
cd statsdaemon-0.6-alpha.linux-amd64.go1.3
./statsdaemon --help
```

Source Example:
```
wget 'https://github.com/bitly/statsdaemon/archive/v0.6-alpha.tar.gz'
tar xpf v0.6-alpha.tar.gz
cd statsdaemon-0.6-alpha
go build
./statsdaemon-0.6-alpha --help
```

To work with the latest dev code, just clone master and build.
```
git clone https://github.com/bitly/statsdaemon.git
cd statsdaemon
go build
./statsdaemon --help
```

Command Line Options
Expand Down
5 changes: 2 additions & 3 deletions dist.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash

# build binary distributions for linux/amd64 and darwin/amd64
set -e
set -e

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "working dir $DIR"
mkdir -p $DIR/dist

os=$(go env GOOS)
arch=$(go env GOARCH)
version=$(cat $DIR/version.go | grep "const VERSION" | awk '{print $NF}' | sed 's/"//g')
goversion=$(go version | awk '{print $3}')
Expand All @@ -17,7 +16,7 @@ echo "... running tests"

for os in linux darwin; do
echo "... building v$version for $os/$arch"
BUILD=$(mktemp -d -t statsdaemon)
BUILD=$(mktemp -d -t statsdaemon.XXXXXXXX)
TARGET="statsdaemon-$version.$os-$arch.$goversion"
GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build -o $BUILD/$TARGET/statsdaemon || exit 1
pushd $BUILD
Expand Down

0 comments on commit 3c1be7f

Please sign in to comment.