Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def release(ctx):
x = subprocess.check_output("git status --porcelain", shell=True).decode("ASCII")
for line in x.split("\n"):
if line.strip().startswith("??") or len(line.strip()) == 0:
continue
raise Exception(
"Found locally modified changes from 'git status' - please commit and push or revert"
)
import ai2thor._version
tag = "v" + ai2thor._version.__version__
subprocess.check_call('git tag -a %s -m "release %s"' % (tag, tag), shell=True)
subprocess.check_call("git push origin master --tags", shell=True)
subprocess.check_call(
"twine upload -u ai2thor dist/ai2thor-{ver}-* dist/ai2thor-{ver}.*".format(
ver=ai2thor._version.__version__
),
shell=True,
)
x = subprocess.check_output("git status --porcelain", shell=True).decode("ASCII")
for line in x.split("\n"):
if line.strip().startswith("??") or len(line.strip()) == 0:
continue
raise Exception(
"Found locally modified changes from 'git status' - please commit and push or revert"
)
import ai2thor._version
tag = "v" + ai2thor._version.__version__
subprocess.check_call('git tag -a %s -m "release %s"' % (tag, tag), shell=True)
subprocess.check_call("git push origin master --tags", shell=True)
subprocess.check_call(
"twine upload -u ai2thor dist/ai2thor-{ver}-* dist/ai2thor-{ver}.*".format(
ver=ai2thor._version.__version__
),
shell=True,
)