Using build tools to inject version into init, passing tox tests
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ venv
|
||||
docker/mopidy.conf
|
||||
docker/data/
|
||||
docker-compose.yml
|
||||
/.tox/
|
||||
|
||||
@ -53,6 +53,12 @@ copydir('src/assets', 'mopidy_iris/static/assets', function(error){
|
||||
fs.writeFileSync(html_file, html_file_content, 'utf8');
|
||||
console.log('Setting version in HTML');
|
||||
|
||||
console.log('Setting version in Python');
|
||||
var init_file = "mopidy_iris/__init__.py";
|
||||
var init_file_content = fs.readFileSync(init_file, "utf8");
|
||||
init_file_content = init_file_content.replace(/(?:__version__\ \=\ \')(?:.*)'/, "__version__ = '"+version+"'");
|
||||
fs.writeFileSync(init_file, init_file_content, 'utf8');
|
||||
|
||||
console.log('Setting version in NPM');
|
||||
var package_file = "package.json";
|
||||
var package_file_content = fs.readFileSync(package_file, "utf8");
|
||||
|
||||
@ -3,7 +3,7 @@ import logging, json, pathlib
|
||||
import pkg_resources
|
||||
from mopidy import config, ext
|
||||
|
||||
__version__ = pkg_resources.get_distribution("Mopidy-Iris").version
|
||||
__version__ = '3.44.0'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -100,7 +100,7 @@
|
||||
|
||||
// Release details
|
||||
// These are automatically injected to built HTML
|
||||
var build = "1580372023";
|
||||
var build = "1580404628";
|
||||
var version = "3.44.0";
|
||||
|
||||
// Construct the script tag
|
||||
|
||||
Reference in New Issue
Block a user