Adding version to setup.cfg

This commit is contained in:
James Barnsley
2020-01-31 06:29:54 +13:00
parent b127cffe4c
commit 7e7fe8d65e
6 changed files with 14 additions and 8 deletions

View File

@ -53,13 +53,19 @@ 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');
console.log('Setting version in __init__.py');
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');
console.log('Setting version in setup.cfg');
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 package.json');
var package_file = "package.json";
var package_file_content = fs.readFileSync(package_file, "utf8");
package_file_content = package_file_content.replace(/(?:\"version\"\:\ \")(?:.*)"/, '"version": "'+version+'"');

View File

@ -100,7 +100,7 @@
// Release details
// These are automatically injected to built HTML
var build = "1580404628";
var build = "1580405383";
var version = "3.44.0";
// Construct the script tag

View File

@ -1,5 +1,5 @@
{
"manifest_version": 3.40,
"manifest_version": 3.44,
"short_name": "Iris",
"name": "Iris",
"icons": [

View File

@ -1,6 +1,6 @@
[metadata]
name = Mopidy-Iris
version = 3.0.0
version = 3.44.0
url = https://github.com/jaedb/mopidy-iris
author = James Barnsley
author_email = james@barnsley.nz

View File

@ -1,5 +1,5 @@
{
"manifest_version": 3.40,
"manifest_version": 3.44,
"short_name": "Iris",
"name": "Iris",
"icons": [

4
tests/test_system.py Normal file → Executable file
View File

@ -5,13 +5,13 @@ from mopidy_iris.system import IrisSystemThread, IrisSystemPermissionError
def test_system_sh_path():
iris_system = IrisSystemThread('foo', None)
iris_system = IrisSystemThread('foo', None, None)
assert iris_system.script_path.is_file()
assert iris_system.script_path.name == "system.sh"
def test_can_run():
iris_system = IrisSystemThread('foo', None)
iris_system = IrisSystemThread('foo', None, None)
iris_system._USE_SUDO = False
assert iris_system.can_run() is True