Skip to content

Commit

Permalink
Store version in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
zkovari committed Oct 24, 2024
1 parent 2e3e38a commit 82bc313
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ venv
profile.stats
test.docx
document.pdf
src/build/settings/base.json

generated
coverage
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)

Expand Down
22 changes: 21 additions & 1 deletion src/main/python/plotlyst/version.py
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
"""

plotlyst_version = '2024.11rc1.dev1'

0 comments on commit 82bc313

Please sign in to comment.