Skip to content

Commit

Permalink
Only build linux/amd64 once
Browse files Browse the repository at this point in the history
  • Loading branch information
waits committed May 8, 2017
1 parent abbfa16 commit 549a727
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion etc/build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ go test -v ./...
go test -v -race ./...

ldflags="-X main.version=$(git describe --tags)"
go build -v -ldflags "$ldflags"
GOOS=darwin GOARCH=amd64 go build -v -o ntwrk-darwin-amd64 -ldflags "$ldflags"
GOOS=linux GOARCH=amd64 go build -v -o ntwrk-linux-amd64 -ldflags "$ldflags"

Expand Down
3 changes: 2 additions & 1 deletion etc/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DIR=$ROOT/rel/$HASH
TMP=/tmp/ntwrk-$HASH.tar.gz
SERVICE_DIR=/etc/systemd/system

tar -czf ntwrk.tar.gz ./ntwrk
tar -czf ntwrk.tar.gz ./ntwrk-linux-amd64
scp -i etc/deploy_key -o StrictHostKeyChecking=no ntwrk.tar.gz $HOST:$TMP
scp -i etc/deploy_key -o StrictHostKeyChecking=no etc/ntwrk.service $HOST:$SERVICE_DIR

Expand All @@ -22,6 +22,7 @@ ssh -i etc/deploy_key -o StrictHostKeyChecking=no $HOST <<-EOF
mkdir -p $DIR
tar -xzf $TMP -C $DIR --strip-components=1
mv $DIR/ntwrk-linux-amd64 $DIR/ntwrk
ln -nsf $DIR $ROOT/cur
sudo service ntwrk restart
Expand Down

0 comments on commit 549a727

Please sign in to comment.