Skip to content
Snippets Groups Projects
Commit 2d9a5305 authored by Alvaro Cabrera's avatar Alvaro Cabrera
Browse files

Use globals for version bump

parent 6599e1f7
Branches
Tags
No related merge requests found
#!/bin/sh
VERSION="$(cat package.json | grep '"version":')"
VERSION=${VERSION##*:}
VERSION=${VERSION%,*}
VERSION=$(echo $VERSION | sed 's/"//g')
SEARCH='("version":[[:space:]]*").+(")'
REPLACE="\1${VERSION}\2"
sed -i ".tmp" -E "s/${SEARCH}/${REPLACE}/g" bower.json
rm *.tmp
echo $VERSION
......@@ -6,8 +6,8 @@
"main": "lib/index.js",
"scripts": {
"dist": "yarn build && yarn build:dist",
"build": "tarima -qfe dist",
"build:dist": "node build/dist.js",
"build": "tarima -qfe dist VERSION=`./build/VERSION`",
"build:dist": "yarn build && node build/dist.js",
"test": "yarn test:lint && yarn build && yarn test:unit && yarn test:schema",
"test:lint": "tslint ts/**/*.ts",
"test:unit": "jasmine-node spec/unit --noStackTrace --captureExceptions",
......
......@@ -69,6 +69,8 @@ jsf.locate = function(name: string) {
return container.get(name);
};
jsf.version = '0.5.0-rc3';
/* global VERSION */
jsf.version = VERSION;
export default jsf;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment