diff --git a/CHANGELOG.md b/CHANGELOG.md index 494cd73a4..ea02d278c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## [0.12.1](https://github.com/nodegit/nodegit/releases/tag/v0.12.1) (2016-03-30) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.12.0...v0.12.1) + +# Bug fixes + +- Fixed post install script dying on windows [PR #978](https://github.com/nodegit/nodegit/pull/978) + ## [0.12.0](https://github.com/nodegit/nodegit/releases/tag/v0.12.0) (2016-03-28) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.11.9...v0.12.0) diff --git a/README.md b/README.md index 8fec1521d..dc7724e7f 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ NodeGit -**Stable: 0.12.0** +**Stable: 0.12.1** ## Have a problem? Come chat with us! ## diff --git a/package.json b/package.json index 33719702f..ee0eaa747 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.12.0", + "version": "0.12.1", "homepage": "http://nodegit.org", "keywords": [ "libgit2", @@ -89,6 +89,6 @@ "recompileDebug": "node-gyp configure --debug build", "rebuildDebug": "node generate && node-gyp configure --debug build", "xcodeDebug": "node-gyp configure -- -f xcode", - "postinstall": "bash postinstall.sh" + "postinstall": "node postinstall.js" } } diff --git a/postinstall.js b/postinstall.js new file mode 100755 index 000000000..d022f3607 --- /dev/null +++ b/postinstall.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node + +var fs = require("fs"); +var child_process = require("child_process"); + +if (process.platform !== "linux") { + return; +} + +child_process.exec("node lib/nodegit.js", function(error, stdout, stderr) { + if (stderr && ~stderr.indexOf("libstdc++")) { + console.log("[ERROR] Seems like the latest libstdc++ is missing on your system!"); + console.log(""); + console.log("On Ubuntu you can install it using:"); + console.log(""); + console.log("$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test"); + console.log("$ sudo apt-get update"); + console.log("$ sudo apt-get install libstdc++-4.9-dev"); + } +}); diff --git a/postinstall.sh b/postinstall.sh deleted file mode 100755 index b3fd35fab..000000000 --- a/postinstall.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -if [ -n "$(node lib/nodegit.js 2>&1 | grep libstdc++)" ]; then - echo "[ERROR] Seems like the latest libstdc++ is missing on your system!" - echo "" - echo "On Ubuntu you can install it using:" - echo "" - echo "$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test" - echo "$ sudo apt-get update" - echo "$ sudo apt-get install libstdc++-4.9-dev" - exit 1 -fi