From 0e4cf48f3fe2a093d581835d5ec13e8817922469 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Wed, 20 Sep 2017 09:46:05 +1200 Subject: [PATCH] Output from build --- build.sh | 24 ++++++++++++++---------- mopidy_iris/__init__.py | 2 +- package.json | 3 +-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index aa33968f..ec03a115 100755 --- a/build.sh +++ b/build.sh @@ -1,13 +1,5 @@ #!/bin/bash -# copy assets -echo -e Copying assets $SERVER -rsync -avr src/assets/ mopidy_iris/static/assets/ 2>&1 >/dev/null - -# create HTML files -echo -e Copying index.html -cp src/index.html mopidy_iris/static/index.html - # process production html BUILD=$(date +%s) if [ $# -eq 0 ]; then @@ -16,12 +8,24 @@ else VERSION=$1 fi -echo -e "Injecting build details to js/css URLs (version=$VERSION, build=$BUILD)" +echo -e "Building $VERSION ($BUILD)" + +# copy assets +echo -e Copying assets $SERVER +rsync -avr src/assets/ mopidy_iris/static/assets/ 2>&1 >/dev/null + +# create HTML files +echo -e Copying index.html +cp src/index.html mopidy_iris/static/index.html + +echo -e "Setting version in static HTML" sed -i 's/VERSION_HERE/'$VERSION'/g' mopidy_iris/static/index.html sed -i 's/BUILD_HERE/'$BUILD'/g' mopidy_iris/static/index.html -echo -e "Injecting version to static files" +echo -e "Setting version in Python" sed -i '/__version__ = "/c\__version__ = "'$VERSION'"' mopidy_iris/__init__.py + +echo -e "Setting version in NPM" sed -i '/ "version": "/c\ "version": "'$VERSION'",' package.json echo -e "\x1b[32;01m"Done!"\x1b[39;49;00m" \ No newline at end of file diff --git a/mopidy_iris/__init__.py b/mopidy_iris/__init__.py index 73b53c51..dc740ae1 100755 --- a/mopidy_iris/__init__.py +++ b/mopidy_iris/__init__.py @@ -12,7 +12,7 @@ from handlers import WebsocketHandler, HttpHandler from core import IrisCore logger = logging.getLogger(__name__) -__version__ = "0.0.0" +__version__ = "1.1.2" ## # Core extension class diff --git a/package.json b/package.json index 6e44cf46..5e1f9cc2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mopidy-iris", - "version": "0.0.0", + "version": "1.1.2", "description": "Mopidy HTTP interface", "repository": "https://github.com/jaedb/iris", "author": "James Barnsley ", @@ -43,7 +43,6 @@ "scripts": { "dev": "./build.sh && NODE_ENV=development webpack --watch", "prod": "./build.sh && NODE_ENV=development webpack && NODE_ENV=production webpack", - "test": "./build.sh $1", "release": "NODE_ENV=production webpack && NODE_ENV=development webpack && ./build.sh $1 && python setup.py sdist upload -r pypi" } }