Skip to content

How to develop with osx

metacoma edited this page Mar 31, 2018 · 1 revision

Install docker

user@localhost $ git clone https://github.com/metacoma/silverkey
user@localhost $ cd silverkey
user@localhost $ mkdir artifacts
# build first time
user@localhost $ docker run -v `pwd`/src:/go/src/silverkey-golang-client -w /go/src/silverkey-golang-client -v `pwd`/artifacts:/artifacts  --entrypoint /bin/sh -it --rm metacoma/silverkey-golang-client:latest -c 'GOOS=darwin CGO_LDFLAGS_ALLOW="-mmacosx-version-min.*" CC=o64-clang CXX=o64-clang++ go build -o /artifacts/silverkey_darwin.app silverkey-client.go'
user@localhost $ ls -l artifacts/
total 14496
-rwxr-xr-x 1 user user 14842000 ### 31 23:18 silverkey_darwin.app
# make changes
user@localhost $ vim src/silverkey-client.go
# build again
user@localhost $ docker run -v `pwd`/src:/go/src/silverkey-golang-client -w /go/src/silverkey-golang-client -v `pwd`/artifacts:/artifacts  --entrypoint /bin/sh -it --rm metacoma/silverkey-golang-client:latest -c 'GOOS=darwin CGO_LDFLAGS_ALLOW="-mmacosx-version-min.*" CC=o64-clang CXX=o64-clang++ go build -o /artifacts/silverkey_darwin.app silverkey-client.go'
Clone this wiki locally