-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Autodesk/0.6.6_release
Merged and pushed to pypi
- Loading branch information
Showing
5 changed files
with
78 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env python | ||
""" This script builds and runs automated tests for a new moldesign release. | ||
It's manual for now, will be replaced by Travis or Jenkins soon. | ||
You shouldn't run this unless you know exactly what you're doing and why you're doing it | ||
""" | ||
|
||
import os | ||
import sys | ||
import subprocess | ||
import atexit | ||
|
||
version = sys.argv[1] | ||
|
||
|
||
def run(cmd, display=True): | ||
print '\n>>> %s' % cmd | ||
if display: | ||
return subprocess.check_call(cmd, shell=True) | ||
else: | ||
return subprocess.check_output(cmd, shell=True) | ||
|
||
|
||
tags = set(run('git tag --list', display=False).splitlines()) | ||
rootdir = run('git rev-parse --show-toplevel', display=False).strip() | ||
|
||
assert os.path.abspath(rootdir) == os.path.abspath(os.path.curdir), \ | ||
"This command must be run at root of the repository directory" | ||
|
||
# check that tag is valid | ||
assert version not in tags, "Tag %s already exists!" % version | ||
major, minor, patch = map(int, version.split('.')) | ||
|
||
|
||
# Set the tag! | ||
run('git tag %s' % version) | ||
print 'Tag set: %s' % version | ||
|
||
|
||
def untag(): | ||
if not untag.success: | ||
print 'Failed. Removing version tag %s' % version | ||
run('git tag -d %s' % version) | ||
|
||
untag.success = False | ||
|
||
atexit.register(untag) | ||
|
||
# Check that it propagated to the python package | ||
import pyccc | ||
assert os.path.abspath(os.path.join(pyccc.__path__[0],'..')) == os.path.abspath(rootdir) | ||
assert pyccc.__version__ == version, 'Package has incorrect version: %s' % pyccc.__version__ | ||
|
||
untag.success = True | ||
|
||
# This is the irreversible part - so do it manually | ||
print """ | ||
This LOOKS ready for release! Do the following to create version %s. | ||
If you're ready, run these commands: | ||
1. python setup.py register -r pypi | ||
2. python setup.py sdist upload -r pypi | ||
3. git push origin master --tags | ||
Finally, mark it as release "v%s" in GitHub. | ||
TO ABORT, RUN: | ||
git tag -d %s | ||
""" % (version, version, version) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters