diff --git a/Makefile b/Makefile index 8c195df..3b8a9bf 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,18 @@ all: prod prod: $(shell find . -name "*.go") node_modules/spark-wallet + go-bindata -tags full -prefix node_modules/spark-wallet/dist/www -o bindata.go node_modules/spark-wallet/dist/www/... + go build -tags full -o ./sparko -ldflags "-X main.Version=$$(jq -r '.version' node_modules/spark-wallet/package.json)" + +dist: $(shell find . -name "*.go") node_modules/spark-wallet go-bindata -tags full -prefix node_modules/spark-wallet/dist/www -o bindata.go node_modules/spark-wallet/dist/www/... mkdir -p dist gox -tags="full" -osarch="darwin/amd64 linux/386 linux/amd64 linux/arm windows/386 windows/amd64" -output="dist/sparko_full_{{.OS}}_{{.Arch}}" -ldflags "-X main.Version=$$(jq -r '.version' node_modules/spark-wallet/package.json)" gox -osarch="darwin/amd64 linux/386 linux/amd64 linux/arm windows/386 windows/amd64" -output="dist/sparko_lean_{{.OS}}_{{.Arch}}" -ldflags "-X main.Version=$$(git log --pretty=format:'%H' | head -n 1)" -sparko: $(shell find . -name "*.go") bindata.go - go build -tags full -o ./sparko -ldflags "-X main.Version=$$(jq -r '.version' node_modules/spark-wallet/package.json)" - -bindata.go: node_modules/spark-wallet +sparko: $(shell find . -name "*.go") node_modules/spark-wallet go-bindata -tags full -debug -prefix node_modules/spark-wallet/dist/www -o bindata.go node_modules/spark-wallet/dist/www/... + go build -tags full -o ./sparko -ldflags "-X main.Version=$$(jq -r '.version' node_modules/spark-wallet/package.json)" node_modules/spark-wallet: npm install spark-wallet diff --git a/README.md b/README.md index 7915539..4a559eb 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,11 @@ If you're looking for a RPC server to place in front of your lightningd node and It's an ACL-like security model that is much simpler (and old) than macaroons. Read more on [PERMISSIONS.md](PERMISSIONS.md). -How to build ------------- +FAQ +--- -`make` should work. + * **How do I build?** `make` should work as long as you have [go-bindata](https://github.com/go-bindata/go-bindata) and all the other dependencies (maybe we move to the new Go modules thing, but not yet). + * **What are these "lean" and "full" binaries?** Lean binaries don't include the HTML/JS UI, just the server (for when you just want to call RPC methods over the wire). Doesn't make much difference, but it's something. License -------