Permalink
Browse files

VERSION automation

  • Loading branch information...
sburel committed Jan 24, 2015
1 parent 556d5f3 commit 9d6d77001b10f7de791a3961571941bb1412bfd7
Showing with 12 additions and 9 deletions.
  1. +1 −0 VERSION
  2. +7 −6 buildPackage.sh
  3. +1 −1 package.json
  4. +3 −2 sources/wkc.ts
View
@@ -0,0 +1 @@
0.5.1
View
@@ -1,11 +1,12 @@
#!/bin/bash
########################################################
# Package Builder #
# #
########################################################
VERSION=`tr -d '\n' < VERSION`
COMPILER_TMP='./sources/tmp/'
sed 's/"version": ".*"/"version": "'${VERSION}'"/' package.json > package.tmp.json
mv package.tmp.json package.json
#compiler name
BIN_INP_DIR='./sources/'
BIN_OUT_DIR='./bin/'
@@ -15,7 +16,8 @@ BIN='wkc'
#-----------------------------------------------------------------------------------------
echo '[0] compiling wkc.ts'
tsc --target ES5 --outDir ${COMPILER_TMP} ${BIN_INP_DIR}${BIN}'.ts'
echo '#! /usr/bin/env node' > ${BIN_OUT_DIR}${BIN}
echo '#! /usr/bin/env node' > ${BIN_OUT_DIR}${BIN}
echo 'var VERSION = "'${VERSION}'";' >> ${BIN_OUT_DIR}${BIN}
tr -d '\r' < ${COMPILER_TMP}${BIN}'.js' >> ${BIN_OUT_DIR}${BIN}
chmod +x ${BIN_OUT_DIR}${BIN}
#-----------------------------------------------------------------------------------------
@@ -70,4 +72,3 @@ SOURCES_CLIENT_JS[1]='hogan-2.0.0'
echo -e '\tmoving '${SOURCES_CLIENT_JS_INP_DIR}${ELM}'.js'
done
#-----------------------------------------------------------------------------------------
View
@@ -9,7 +9,7 @@
"xml",
"api"
],
"version": "0.5.0",
"version": "0.5.1",
"preferGlobal": true,
"license": "Apache License 2.0",
"author": "haruni.net",
View
@@ -4,6 +4,7 @@
*/
declare var VERSION;
declare var Buffer;
declare var process;
declare var require;
@@ -41,10 +42,10 @@ module Webkool {
** Template and Css Engine
*/
var version = '0.5.0'; //current version
var version = VERSION || '0.0.1'; //current version
var templateEngine = {
'square': require('../lib/square'), //internal square templating module
'square': require('../lib/square'), //internal square templating module
'mustache': require('../lib/mustache') //internal mustache(hogan.js) templating module
};

0 comments on commit 9d6d770

Please sign in to comment.