Skip to content

Commit

Permalink
Fix in tag.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv authored and ortex committed Sep 30, 2023
1 parent 963cc75 commit 5f72459
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tag.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python3
import argparse
import fileinput
import os
import re
import subprocess
import fileinput
import sys

def check_version_format(version):
Expand Down Expand Up @@ -39,13 +39,15 @@ def commit_change(version):
return
run_command(['git', 'commit', '-m', f'Release {version}'])

def show_status():
run_command(['git', 'status', '--porcelain'])

def create_tag(tag, force):
if force:
run_command(['git', 'tag', '-f', tag])
else:
run_command(['git', 'tag', tag])


def push_change(remote, tag, force):
run_command(['git', 'push', remote, 'HEAD'])
if force:
Expand Down Expand Up @@ -81,7 +83,8 @@ def main():
sys.exit(1)

write_version(version)
commit_change(version, force)
commit_change(version)
show_status()
create_tag(tag, force)
if remote:
push_change(remote, tag, force)
Expand Down

0 comments on commit 5f72459

Please sign in to comment.