-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
import sys | ||
from cid._version import __version__ as old_ver | ||
|
||
os.system('git checkout main') | ||
Check failure Code scanning / CodeGuru Reviewer Scanner Outdated subprocess module API High
This line of code makes an outdated API call to start and communicate with processes. We recommend that you use the subprocess module to start new processes, connect with their pipes, and get their return codes.
Learn more Similar issue at line numbers 6, 21, and 33. Check failure Code scanning / CodeGuru Reviewer Scanner OS command injection High
Starting a process with a shell: Seems safe, but may be changed in the future, consider rewriting without shell https://bandit.readthedocs.io/en/latest/plugins/b605\_start\_process\_with\_a\_shell.html
Check failure Code scanning / CodeGuru Reviewer Scanner OS command injection High
Starting a process with a partial executable path https://bandit.readthedocs.io/en/latest/plugins/b607\_start\_process\_with\_partial\_path.html
|
||
os.system('git pull') | ||
Check failure Code scanning / CodeGuru Reviewer Scanner OS command injection High
Starting a process with a partial executable path https://bandit.readthedocs.io/en/latest/plugins/b607\_start\_process\_with\_partial\_path.html
Check failure Code scanning / CodeGuru Reviewer Scanner OS command injection High
Starting a process with a shell: Seems safe, but may be changed in the future, consider rewriting without shell https://bandit.readthedocs.io/en/latest/plugins/b605\_start\_process\_with\_a\_shell.html
|
||
|
||
bump='patch' | ||
if len(sys.argv)>1 : | ||
|
@@ -16,6 +18,8 @@ | |
else: | ||
raise NotImplementedError('only patch and minor are implemented') | ||
|
||
os.system(f"git checkout -b 'release/{new_ver}'") | ||
|
||
|
||
tx = open('cid/_version.py').read() | ||
with open('cid/_version.py', "w") as f: | ||
|
@@ -27,4 +31,5 @@ | |
|
||
|
||
os.system('git diff HEAD --unified=0') | ||
print('to undo:\n git checkout HEAD -- cfn-templates/cid-cfn.yml cid/_version.py') | ||
print('to undo:\n git checkout HEAD -- cfn-templates/cid-cfn.yml cid/_version.py') | ||
print(f"to continue:\n git commit -am 'release {new_ver}'; git push origin 'release/{new_ver}'") |