diff --git a/build/VERSION b/build/VERSION
new file mode 100755
index 0000000000000000000000000000000000000000..f382c264402ea3621b2a6ecfb675ddb3dc186b45
--- /dev/null
+++ b/build/VERSION
@@ -0,0 +1,14 @@
+#!/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
diff --git a/package.json b/package.json
index 1365bb95c7e40d3d333a5eb01190cfafe55c3697..ecd2905b4e9bd686f69fa5db568237174e9d85f6 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/ts/index.ts b/ts/index.ts
index 9d61fa3af1b46e8413eb6839cb87f3e7bafe5b6c..10a440938486310af6082e7d7eecf1fd0f2e7403 100644
--- a/ts/index.ts
+++ b/ts/index.ts
@@ -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;