updated readme, added git tag script
This commit is contained in:
parent
3fc2562dd4
commit
a8023a0780
14
22_git_tag.py
Normal file
14
22_git_tag.py
Normal file
@ -0,0 +1,14 @@
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
if len(sys.argv) == 3:
|
||||
tag = sys.argv[1]
|
||||
commit = sys.argv[2]
|
||||
command = 'git tag -a {0} {1} -m "{2}"'.format(tag, commit, tag)
|
||||
output = subprocess.check_output(command, shell=True).decode('utf-8')
|
||||
subprocess.call(command, shell=True)
|
||||
subprocess.call('git push --tags', shell=True)
|
||||
else:
|
||||
print 'usage: tag.py TAG_NAME COMMIT'
|
||||
sys.exit(1)
|
@ -20,3 +20,5 @@
|
||||
1. **18_zipper.py**: Zip contents of a directory, adding a timestamp to the filename
|
||||
1. **19_tsv-to-csv.py**: Convert TSV to CSV
|
||||
1. **20_restore_file_from_git.py**: Restore file from Git History
|
||||
1. **21_twitter_bot.py**: Twitter Bot
|
||||
1. **22_git_tag.py**: Create Git Tag based on a commit
|
Loading…
Reference in New Issue
Block a user