From 82bc31357c2cc3448a18aa32771d38b73216cd2c Mon Sep 17 00:00:00 2001 From: Zsolt Kovari Date: Thu, 24 Oct 2024 09:29:10 +0200 Subject: [PATCH] Store version in one place --- .gitignore | 1 + pyproject.toml | 2 +- setup.py | 9 +++------ src/main/python/plotlyst/version.py | 22 +++++++++++++++++++++- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 7f461dd3e..f8709f905 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ venv profile.stats test.docx document.pdf +src/build/settings/base.json generated coverage diff --git a/pyproject.toml b/pyproject.toml index f7822314d..88d887042 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ test = [ [tool.briefcase] project_name = "Plotlyst" bundle = "com.plotlyst" -version = "0.1.0" +version = "2024.11rc1.dev1" [tool.briefcase.app.plotlyst] formal_name = "Plotlyst" diff --git a/setup.py b/setup.py index 1860b7751..22a330167 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ def get_base_version(): def get_full_version(base_version): timestamp = time.strftime("%Y%m%d.%H%M%S") - return f"{base_version}.{timestamp}" + return f"{base_version}+{timestamp}" def check_versions(base_version): @@ -52,11 +52,8 @@ def generate_json_file(version): json.dump(settings, json_file, indent=4) -base_version = get_base_version() - -check_versions(base_version) - -version = get_full_version(base_version) +version = get_base_version() +check_versions(version) generate_json_file(version) diff --git a/src/main/python/plotlyst/version.py b/src/main/python/plotlyst/version.py index e49b678d9..24ef6440f 100644 --- a/src/main/python/plotlyst/version.py +++ b/src/main/python/plotlyst/version.py @@ -1 +1,21 @@ -plotlyst_version = '0.1.0' +""" +Plotlyst +Copyright (C) 2021-2024 Zsolt Kovari + +This file is part of Plotlyst. + +Plotlyst is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Plotlyst is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +""" + +plotlyst_version = '2024.11rc1.dev1'