Skip to content

Commit

Permalink
remove cr path
Browse files Browse the repository at this point in the history
  • Loading branch information
endremborza committed Apr 2, 2022
1 parent 347203e commit 918f5f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion branthebuilder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Python package management"""
from .main import app # noqa

__version__ = "1.0.2"
__version__ = "1.0.3"
12 changes: 4 additions & 8 deletions branthebuilder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from cookiecutter.main import cookiecutter

from .nb_scripts import get_nb_scripts, get_notebooks, nb_dir
from .vars import cc_repo, conf, current_release_path, docdir
from .vars import cc_repo, conf, docdir

app = typer.Typer()

Expand Down Expand Up @@ -128,7 +128,7 @@ def build_docs():


@app.command()
def tag():
def tag(msg: str):
branch = _get_branch()
if branch != "main":
raise SetupException(f"only main branch can be tagged - {branch}")
Expand All @@ -138,17 +138,13 @@ def tag():
if tag_version in tags:
raise SetupException(f"{tag_version} version already tagged")
if Path(docdir).exists():
notes = current_release_path.read_text()
note_rst = f"{tag_version}\n------\n\n" + notes
note_rst = f"{tag_version}\n------\n\n" + msg
Path(docdir, "release_notes", f"{tag_version}.rst").write_text(note_rst)
build_docs()
current_release_path.write_text("")
check_call(["git", "add", "docs"])
check_call(["git", "commit", "-m", f"docs for {tag_version}"])
else:
notes = tag_version

check_call(["git", "tag", "-a", tag_version, "-m", notes])
check_call(["git", "tag", "-a", tag_version, "-m", msg])
check_call(["git", "push"])
check_call(["git", "push", "origin", tag_version])

Expand Down
1 change: 0 additions & 1 deletion branthebuilder/vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import toml

docdir = "docs"
current_release_path = Path(docdir, "current_release.rst")
cc_repo = "https://github.com/endremborza/python-boilerplate-v2"

_D = {"project": {"name": ".", "author": []}, "tool": {"branb": {"line-length": 88}}}
Expand Down

0 comments on commit 918f5f9

Please sign in to comment.