Skip to content

Commit

Permalink
Build and place in bin
Browse files Browse the repository at this point in the history
  • Loading branch information
archis-polyverse committed Oct 6, 2018
1 parent c854bb4 commit 24ced85
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ropoly
.DS_Store
*.swp
vendor
bin
9 changes: 0 additions & 9 deletions Dockerfile.libc

This file was deleted.

14 changes: 7 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

# This is the build for a static binary on linux
# CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo --ldflags '-extldflags "-static"' .
mkdir bin
docker run --rm -it \
-v $PWD:/go/src/github.com/polyverse/ropoly \
-w /go/src/github.com/polyverse/ropoly \
golang

# This is the build for a dynamic binary on linux
# CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo .

# Use pv to build
pv run maketool .
echo "Copying libc binary into bin..."
cp ./ropoly ./bin/ropoly-libc-x86_64
File renamed without changes.
13 changes: 13 additions & 0 deletions scripts/buildlibc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

echo "Building Ropoly inside Docker..."

echo "Installing dep..."
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh

echo "Installing dependencies..."
dep ensure

echo "Building..."
go build

0 comments on commit 24ced85

Please sign in to comment.