Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
8 changes: 2 additions & 6 deletions lbranch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
lbranch - A Git utility that shows recently checked out branches in chronological order.
"""

from pathlib import Path

from .main import main
from .version import __version__

_version_file = Path(__file__).parent.parent / 'VERSION'
__version__ = _version_file.read_text().strip()

__all__ = ['main']
__all__ = ['main', '__version__']
7 changes: 2 additions & 5 deletions lbranch/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import re
import subprocess
import sys
from pathlib import Path

from .version import __version__

# Exit codes - following sysexits.h conventions
EXIT_SUCCESS = 0 # successful execution
Expand Down Expand Up @@ -83,10 +84,6 @@ def supports_color():
BLUE = ''
NC = ''

# Read version from VERSION file
_version_file = Path(__file__).parent.parent / 'VERSION'
__version__ = _version_file.read_text().strip()


def print_error(message, exit_code=EXIT_SOFTWARE):
"""Print error message and exit with specified code"""
Expand Down
6 changes: 6 additions & 0 deletions lbranch/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Version information for lbranch."""

from pathlib import Path

_version_file = Path(__file__).parent.parent / 'VERSION'
__version__ = _version_file.read_text().strip()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "lbranch"
version = "0.1.2"
version = "0.1.3"
description = "A Git utility that shows recently checked-out branches in chronological order and lets you quickly switch between them."
readme = "README.md"
requires-python = ">=3.7"
Expand Down