Output from build

This commit is contained in:
James Barnsley
2017-09-20 09:46:05 +12:00
parent acf26fc9c5
commit 0e4cf48f3f
3 changed files with 16 additions and 13 deletions

View File

@ -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"

View File

@ -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

View File

@ -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 <james@barnsley.nz>",
@ -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"
}
}