Skip to content

Commit

Permalink
Merge 54036eb into 0b7f8b5
Browse files Browse the repository at this point in the history
  • Loading branch information
eeintech committed Aug 20, 2021
2 parents 0b7f8b5 + 54036eb commit 0ce7b33
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,15 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Alter the version in pyproject.toml
- name: Alter the version in pyproject.toml and overwrite __version__
run: >
GTAG=$(echo $REF | sed -e 's#.*/##') &&
sed
--in-place
--expression
"s/version = \".*\" # placeholder/version = \"$GTAG\"/g"
pyproject.toml
echo "__version__ = $GTAG" > kintree/__init__.py
env:
REF: ${{ github.ref }}
- name: Display the inferred version
Expand Down
11 changes: 11 additions & 0 deletions kintree/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# WARNING: This file is overwriten when publishing to PyPI
# __version__ refers to the tag version instead

# VERSION INFORMATION
version_info = {
'MAJOR_REVISION': 0,
'MINOR_REVISION': 4,
'RELEASE_STATUS': 99, # Dev = 99
}

__version__ = '.'.join([str(v) for v in version_info.values()])
11 changes: 0 additions & 11 deletions kintree/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
from ..common.tools import cprint
from .import config_interface

# VERSION INFORMATION
version_info = {
'MAJOR_REVISION': 0,
'MINOR_REVISION': 4,
'RELEASE_STATUS': 4, # Digit means stable version
}
try:
version = '.'.join([str(v) for v in version_info.values()])
except:
version = '0.0.alpha'

# DEBUG
# Testing
ENABLE_TEST = False
Expand Down
4 changes: 3 additions & 1 deletion kintree/kintree_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# Webbrowser
import webbrowser

# Version
from . import __version__
# Settings
from .config import settings as settings
# PySimpleGUI
Expand Down Expand Up @@ -888,7 +890,7 @@ def main():
]

# Create the Window
window = sg.Window(f'Ki-nTree [{settings.version}]',
window = sg.Window(f'Ki-nTree [{__version__}]',
layout,
location=(500, 500))

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "kintree"
version = "0.1.0" # placeholder
version = "0.4.99" # placeholder
description = "Fast part creation in KiCad and InvenTree"
authors = ["eeintech <eeintech@eeinte.ch>"]
maintainers = ["eeintech <eeintech@eeinte.ch>", "randrej <r.andrej@gmail.com>"]
Expand Down

0 comments on commit 0ce7b33

Please sign in to comment.