Commit 6ff7c113 authored by Leo Iannacone's avatar Leo Iannacone

set version in package.json - update config - update script/do_release.sh

parent 374e5483
...@@ -80,7 +80,7 @@ config.web.preferences.debug = 0 # debug level - 0 means disabled ...@@ -80,7 +80,7 @@ config.web.preferences.debug = 0 # debug level - 0 means disabled
### ###
The version The version
### ###
config.version = "0.6.0" config.version = require("../package").version
### ###
List of files to not show in webui List of files to not show in webui
......
{ {
"name": "debomatic-webui", "name": "debomatic-webui",
"version": "0.0.1", "version": "0.6.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"express": "4.x", "express": "4.x",
"serve-index": "*", "serve-index": "*",
"serve-static": "*", "serve-static": "*",
"errorhandler ": "*", "errorhandler ": "*",
"ejs": ">= 0.0.1", "ejs": "1.*",
"socket.io": "1.*", "socket.io": "1.*",
"tail": "*", "tail": "*",
"extend": "~1.3.0" "extend": "*"
}, },
"scripts": { "scripts": {
"install": "bash scripts/install.sh", "install": "bash scripts/install.sh",
......
#!/bin/bash #!/bin/bash
VERSION="$1"
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."
PACKAGE="${BASE_DIR}/debomatic-webui/package.json"
CURRENT="`grep '"version":' ${PACKAGE} | awk -F'"' '{print $4}'`"
if [ $# == 0 ] ; then if [ $# == 0 ] ; then
echo "Please specify a version number." echo "Please specify a new version number."
echo "Current verion is ${CURRENT}"
exit exit
fi fi
VERSION=$1
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."
CONFIG=${BASE_DIR}/debomatic-webui/lib/config.js
CURRENT="`grep "^config.version" ${CONFIG} | awk -F"'" '{print $2}'`"
y='n' y='n'
echo -n "Current version is ${CURRENT}. Bump to ${VERSION} ? [y/N] " echo -n "Current version is ${CURRENT}. Bump to ${VERSION} ? [y/N] "
read y read y
if [ "$y" == "y" -o "$y" == "Y" ] ; then if [ "$y" == "y" -o "$y" == "Y" ] ; then
sed -r "s/^config.version = '(.*)'/config.version = '${VERSION}'/" -i $CONFIG || exit 1 sed -r "s/\"version\": \"(.*)\"/\"version\": \"${VERSION}\"/" -i $PACKAGE || exit 1
y='n' y='n'
echo -n "Do git-commit? [y/N] " echo -n "Do git-commit? [y/N] "
read y read y
if [ "$y" == "y" -o "$y" == "Y" ] ; then if [ "$y" == "y" -o "$y" == "Y" ] ; then
git commit -m "Bumped version ${VERSION}" ${CONFIG} git commit -m "Bumped version ${VERSION}" ${PACKAGE}
y='n' y='n'
echo -n "Do git-tag? [y/N] " echo -n "Do git-tag? [y/N] "
read y read y
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment