feature: dont update changelog by default #40
@@ -18,7 +18,7 @@ app = typer.Typer()
|
|||||||
|
|
||||||
|
|
||||||
@app.command()
|
@app.command()
|
||||||
def tag(token: Optional[str] = None):
|
def tag(token: Optional[str] = None, update_changelog: bool = False):
|
||||||
"""Crea un nuevo tag para el último merge."""
|
"""Crea un nuevo tag para el último merge."""
|
||||||
base.ensure_initialized()
|
base.ensure_initialized()
|
||||||
|
|
||||||
@@ -69,15 +69,18 @@ def tag(token: Optional[str] = None):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if update_changelog:
|
||||||
changelog = Changelog()
|
changelog = Changelog()
|
||||||
|
|
||||||
changelog.update(next_tag, commits)
|
changelog.update(next_tag, commits)
|
||||||
Git("add", Changelog.FILENAME).exec(print=None if ci else "Agregando nuevo CHANGELOG.md")
|
Git("add", Changelog.FILENAME).exec(print=None if ci else "Agregando nuevo CHANGELOG.md")
|
||||||
Git("commit", message=Changelog.COMMIT_MESSAGE).exec(print=None if ci else "Creando commit")
|
Git("commit", message=Changelog.COMMIT_MESSAGE).exec(print=None if ci else "Creando commit")
|
||||||
tag_commit = Git("show", "HEAD", patch=False, format="%h").firstline()
|
|
||||||
|
|
||||||
if ci:
|
if ci:
|
||||||
Git("push").exec()
|
Git("push").exec()
|
||||||
|
|
||||||
|
tag_commit = Git("show", "HEAD", patch=False, format="%h").firstline()
|
||||||
|
|
||||||
|
if ci:
|
||||||
base.get_remote_api(token).create_tag(next_tag, tag_commit)
|
base.get_remote_api(token).create_tag(next_tag, tag_commit)
|
||||||
print(next_tag)
|
print(next_tag)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user