From a62410da67634b8f79eb8ab29726f900af117b6c Mon Sep 17 00:00:00 2001 From: Chris Kleeschulte Date: Wed, 5 Aug 2015 11:16:02 -0400 Subject: [PATCH] Spacing, RELEASE notes, clean up - Removed main Makefile - Fixed wording in README - Altered build script - Fixed clean script --- Makefile | 9 ---- README.md | 12 +++++ RELEASE.md | 35 ++++++++++++++ bin/build-libbitcoind | 2 +- bin/clean | 3 +- binding.gyp | 110 ++++++++++++++++++++++-------------------- 6 files changed, 107 insertions(+), 64 deletions(-) delete mode 100644 Makefile create mode 100644 RELEASE.md diff --git a/Makefile b/Makefile deleted file mode 100644 index 38c38adc..00000000 --- a/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -all: - @node-gyp clean 2>/dev/null - node-gyp -d configure - node-gyp build - -clean: - @node-gyp clean 2>/dev/null - -.PHONY: all clean diff --git a/README.md b/README.md index 70684f34..54ec1402 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,12 @@ If Node.js v0.12 isn't installed, it can be installed using "nvm", it can be don nvm install v0.12 ``` +Install node-pre-gyp to allow you to get the binaries for bindings or to build the objects from source: + +```bash +npm install node-pre-gyp -g +``` + To build Bitcoin Core and bindings development packages are needed: ```bash @@ -79,6 +85,12 @@ If Node.js v0.12 and associated commands "node", "npm" and "nvm" are not already nvm install v0.12 ``` +Install node-pre-gyp to allow you to get the binaries for bindings or to build the objects from source: + +```bash +npm install node-pre-gyp -g +``` + Clone the bitcore-node repository locally: ```bash diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..ca46c42e --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,35 @@ +Bitcore Node +======= + +A Node.js module that adds a native interface to Bitcoin Core for querying information about the Bitcoin blockchain. Bindings are linked to Bitcore Core compiled as a static library. + +## Release Notes + +Binaries for the C++ binding file (which includes libbitcoind statically linked in) are distributed with the help of node-pre-gyp. Node-pre-gyp publishes pre-built binaries to S3 for later download and installation. Source files can also be built if binaries are not desired. + +## How to release + +Ensure you've followed the instructions in the README.md for building the project from source. You will be using the node-pre-gyp to package and publish the project to S3. You will also need credentials for Bitpay's bitcore-node S3 bucket and be listed as an author for the bitcore-node's npm module. + +- Create a file, ".node_pre_gyprc" in your home directory +- The format of this file should be: + + +```json +{ + "accessKeyId": "xxx", + "secretAccessKey": "yyy" +} +``` + +- then run the commands to push binaries corresponding to the version in package.json to S3 and npm + +```bash +npm install +node-pre-gyp package publish +npm publish +``` + + + + diff --git a/bin/build-libbitcoind b/bin/build-libbitcoind index d0175da8..c39f4079 100755 --- a/bin/build-libbitcoind +++ b/bin/build-libbitcoind @@ -152,5 +152,5 @@ apply the current patch from "${root_dir}"/etc/bitcoin.patch? (y/N): " prepare_for_caching echo 'Build finished successfully.' else - echo 'Using existing shared library.' + echo 'Using existing static library.' fi diff --git a/bin/clean b/bin/clean index a36a42b1..ff0d42b8 100755 --- a/bin/clean +++ b/bin/clean @@ -2,6 +2,7 @@ root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." cd "${root_dir}" - +pushd "${root_dir}"/libbitcoind make clean +popd node-pre-gyp clean diff --git a/binding.gyp b/binding.gyp index b44ee1d8..ccd650ca 100755 --- a/binding.gyp +++ b/binding.gyp @@ -1,59 +1,63 @@ { - 'targets': [{ - 'target_name': "<(module_name)", - 'include_dirs' : [ - '