diff --git a/VERSION.md b/VERSION.md index 5141b615..3ec370e1 100755 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -3.4.4 \ No newline at end of file +3.4.5 \ No newline at end of file diff --git a/build.sh b/build.sh index 08a54be8..00439ed4 100755 --- a/build.sh +++ b/build.sh @@ -19,7 +19,7 @@ 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 "Setting version in Python" -sed -i '/__version__ = "/c\__version__ = "'$VERSION'"' mopidy_iris/__init__.py +sed -i "/__version__ = '/c\__version__ = '"$VERSION"'" mopidy_iris/__init__.py echo -e "Setting version in NPM" sed -i '/ "version": "/c\ "version": "'$VERSION'",' package.json diff --git a/mopidy_iris/__init__.py b/mopidy_iris/__init__.py index 0dc92db4..782e0d85 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__ = "3.4.4" +__version__ = '3.4.5' ## # Core extension class diff --git a/package.json b/package.json index 74025ea1..13b09688 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mopidy-iris", - "version": "3.4.4", + "version": "3.4.5", "description": "Mopidy HTTP interface", "repository": "https://github.com/jaedb/iris", "author": "James Barnsley ", @@ -41,8 +41,10 @@ "react-lazyload": "2.2.7" }, "scripts": { + "build": "./build.sh", + "test": "./build.sh && ./release.sh", "dev": "./build.sh && NODE_ENV=development webpack --watch", "prod": "./build.sh && NODE_ENV=development webpack && NODE_ENV=production webpack", - "release": "./build.sh && NODE_ENV=production webpack && NODE_ENV=development webpack && python setup.py sdist upload -r pypi" + "release": "./build.sh && NODE_ENV=production webpack && NODE_ENV=development webpack && python setup.py sdist upload -r pypi && ./release.sh" } } diff --git a/release.sh b/release.sh index 708e557b..da5f9bed 100755 --- a/release.sh +++ b/release.sh @@ -17,7 +17,7 @@ TAG=$(git tag -a "$VERSION" -m "Releasing $VERSION ($BUILD)") echo -e $TAG echo -e "git push" -PUSH=$(git push) -echo -e $PUSH +#PUSH=$(git push) +#echo -e $PUSH echo -e "\x1b[32;01m"Done!"\x1b[39;49;00m" \ No newline at end of file diff --git a/src/index.html b/src/index.html index 0b7680bc..96f728cc 100755 --- a/src/index.html +++ b/src/index.html @@ -53,29 +53,27 @@ // Check for test mode. This is toggled under Settings > Debug > Test mode var ui = JSON.parse( localStorage.getItem('ui') ); + var test_mode = (typeof(ui) !== 'undefined' && ui && typeof(ui.test_mode) !== 'undefined' && ui.test_mode); - // Test mode either not enabled, or not configured - if (typeof(ui) === 'undefined' || !ui || typeof(ui.test_mode) === 'undefined' || !ui.test_mode){ - - // Production-grade, minified app - js.src = '/iris/app.min.js?v='+build; - css.href = '/iris/app.min.css?v='+build; - - // Initiate error tracking. This helps catch errors early so - // patches can accurately and quickly fix issues. - Raven.config( - 'https://023e3bf7721b48f29948545fc36a4621@sentry.io/219026', - { - release: version+"_"+build - } - ).install(); - - // We're in test mode, so use built (but not minified) code - } else { + // Test mode, use built (but not minified) code + if (test_mode){ js.src = '/iris/app.js?v='+build; css.href = '/iris/app.css?v='+build; + + // Production-grade, minified app + } else { + js.src = '/iris/app.min.js?v='+build; + css.href = '/iris/app.min.css?v='+build; } - + + // Initiate error tracking. This helps catch errors early so + // patches can accurately and quickly fix issues. + Raven.config( + 'https://023e3bf7721b48f29948545fc36a4621@sentry.io/219026', + { + release: version+(test_mode ? "_testmode" : "") + } + ).install(); // And finally inject our CSS/JS tags document.body.appendChild(js);