Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added version helper script

  • Loading branch information...
commit a30e30fd7a3e4eae6f05c0a37c637d6ef7ad0e9f 1 parent cecaf28
@davglass davglass authored
Showing with 22 additions and 2 deletions.
  1. +5 −2 Makefile
  2. +17 −0 scripts/versions.js
View
7 Makefile
@@ -4,7 +4,7 @@ all:
help:
./bin/yogi.js --help | tail -n+8 > ./conf/docs/partials/help.mustache
-docs: help
+docs: version help
./node_modules/.bin/selleck --project conf/docs/ ./docs/ --output ./output
deploydocs: docs
@@ -17,4 +17,7 @@ lint:
test:
npm test
-.PHONY: lint test docs help
+version:
+ ./scripts/versions.js
+
+.PHONY: lint test docs help version deploydocs
View
17 scripts/versions.js
@@ -0,0 +1,17 @@
+#!/usr/bin/env node
+
+var path = require('path'),
+ fs = require('fs'),
+ package = require(path.join(__dirname, '../', 'package.json')),
+ version = package.version,
+ doc = path.join(__dirname, '../', 'conf', 'docs', 'project.json');
+
+console.log('[version]', version);
+console.log('[doc]', doc);
+
+var docJSON = require(doc);
+
+docJSON.version = version;
+
+fs.writeFileSync(doc, JSON.stringify(docJSON, null, 2));
+console.log('[done]');

0 comments on commit a30e30f

Please sign in to comment.
Something went wrong with that request. Please try again.