Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Francesco Witz
Changelog Generator
Commits
ce9fd37b
Commit
ce9fd37b
authored
Feb 13, 2022
by
Francesco Witz
Browse files
fix: git tag wrongly passed params
parent
a4cf4036
Changes
1
Hide whitespace changes
Inline
Side-by-side
git_scrapper.py
View file @
ce9fd37b
...
...
@@ -86,19 +86,15 @@ def add_git_tag(version: str, commit_hash: str):
""" Method that add a git tag on the last commit or to a specific commit """
# Simply executing the git tag commands. If commit_hash is None, we apply the tag to the last commit
if
commit_hash
==
None
:
print
(
os
.
getcwd
())
subprocess
.
call
(
[
'git'
,
'tag'
],
stderr
=
subprocess
.
STDOUT
)
subprocess
.
check_output
(
[
'git'
,
'tag'
,
'-a'
,
version
,
'-m'
,
'Tag for version '
+
version
[
1
:]],
stderr
=
subprocess
.
STDOUT
)
subprocess
.
check_output
(
[
'git'
,
'push'
],
stderr
=
subprocess
.
STDOUT
[
'git'
,
'push'
,
'--tags'
],
stderr
=
subprocess
.
STDOUT
)
else
:
subprocess
.
check_output
(
[
'git'
,
'tag'
,
'-a
'
+
version
,
'-m
Tag for version '
+
version
,
' '
+
commit_hash
],
stderr
=
subprocess
.
STDOUT
[
'git'
,
'tag'
,
'-a
'
,
version
,
'-m
'
,
'
Tag for version '
+
version
,
' '
+
commit_hash
],
stderr
=
subprocess
.
STDOUT
)
...
...
@@ -106,10 +102,10 @@ def remove_git_tag(version):
""" Method that remove a git tag from the repo """
# Removing the specific tag from the local repo and from the distant one
subprocess
.
check_output
(
[
'git'
,
'tag'
,
'-d
'
+
version
],
stderr
=
subprocess
.
STDOUT
[
'git'
,
'tag'
,
'-d
'
,
version
],
stderr
=
subprocess
.
STDOUT
)
subprocess
.
check_output
(
[
'git'
,
'push'
,
'--delete origin
'
+
version
],
stderr
=
subprocess
.
STDOUT
[
'git'
,
'push'
,
'--delete origin
'
,
version
],
stderr
=
subprocess
.
STDOUT
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment