-
Notifications
You must be signed in to change notification settings - Fork 0
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 #93 from dwhswenson/release-0.3.0
Release 0.3.0
- Loading branch information
Showing
22 changed files
with
234 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
python -m pip install -e . |
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,5 @@ | ||
#!/bin/bash | ||
|
||
echo "Using custom test-testpypi" | ||
cd ~ | ||
python -c "import autorelease" |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
INSTALL_AUTORELEASE="python -m pip install autorelease==0.2.3" | ||
DIR=`dirname $0` | ||
source autorelease-env.sh | ||
INSTALL_AUTORELEASE="python -m pip install autorelease==0.3.0" | ||
if [ -f autorelease-env.sh ]; then | ||
source autorelease-env.sh | ||
fi | ||
|
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
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
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
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
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,42 @@ | ||
import yaml | ||
|
||
from packaging.version import Version | ||
|
||
from autorelease.version_checks import parse_versions | ||
from autorelease.utils import import_setup | ||
from autorelease import DefaultCheckRunner | ||
|
||
def checker_from_yaml_dict(release_check): | ||
repo_path = release_check.get('repo_path', '.') | ||
release_branches = release_check.get('release-branches', []) | ||
release_tag_format = release_check.get('release-tag', "v{BASE_VERSION}") | ||
versions = parse_versions(release_check['versions']) | ||
base_version = Version(list(versions.values())[0]).base_version | ||
release_tag = release_tag_format.format(BASE_VERSION=base_version) | ||
setup = import_setup(directory=repo_path) | ||
|
||
checker = DefaultCheckRunner( | ||
versions=versions, | ||
setup=setup, | ||
repo_path=repo_path | ||
) | ||
checker.release_branches = release_branches + [release_tag] | ||
return checker | ||
|
||
|
||
def run_checks(yml, branch=None, event=None, allow_patch_skip=False): | ||
dct = yaml.load(yml, Loader=yaml.FullLoader) | ||
release_check = dct['release-check'] | ||
checker = checker_from_yaml_dict(release_check) | ||
if branch is None and event is None: | ||
branch, event = checker.get_branch_event_from_github_env() | ||
|
||
tests = checker.select_tests_from_branch_event(branch, event, | ||
allow_patch_skip) | ||
checker.run_as_test(tests) | ||
|
||
|
||
if __name__ == "__main__": | ||
with open("autorelease.yml", 'r') as f: | ||
run_checks(f) | ||
|
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
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
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,21 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$DRY" ]; then | ||
wait-for-testpypi | ||
fi | ||
|
||
export PROJECT=`python setup.py --name` | ||
export VERSION=`pypi-max-version $PROJECT` | ||
echo "Installing ${PROJECT}==${VERSION} (allowing pre-releases)" | ||
if [ -z "$DRY" ]; then | ||
python -m pip install --pre --force-reinstall \ | ||
--index-url https://test.pypi.org/simple/ \ | ||
--extra-index-url https://pypi.org/simple ${PROJECT}==${VERSION} | ||
fi | ||
|
||
if [ -z "$PACKAGE_IMPORT_NAME" ]; then | ||
export PACKAGE_IMPORT_NAME=$PROJECT | ||
fi | ||
echo "PROJECT: $PROJECT" | ||
echo "PACKAGE_IMPORT_NAME: $PACKAGE_IMPORT_NAME" | ||
echo "AUTORELEASE_TEST_TESTPYPI: $AUTORELEASE_TEST_TESTPYPI" |
Oops, something went wrong.