示例#1
0
def upload_distribution():
    tools.assert_can_release()
    subprocess.check_call([
        sys.executable,
        "-m",
        "twine",
        "upload",
        "--config-file",
        tools.PYPIRC,
        os.path.join(DIST, "*"),
    ])
    # Create a GitHub release, to trigger Zenodo DOI minting.  See
    # https://developer.github.com/v3/repos/releases/#create-a-release
    requests.post(
        "https://api.github.com/repos/HypothesisWorks/hypothesis/releases",
        json=dict(
            tag_name=tag_name(),
            name="Hypothesis for Python - version " + current_version(),
            body=("You can [read the changelog for this release here]("
                  "https://hypothesis.readthedocs.io/en/latest/changes.html#v"
                  "%s)." % (current_version().replace(".", "-"), )),
        ),
        timeout=120,  # seconds
        # Scoped personal access token, stored in Travis environ variable
        auth=("Zac-HD", os.environ["Zac_release_token"]),
    ).raise_for_status()
示例#2
0
def upload_distribution():
    """Upload the built package to rubygems."""
    tools.assert_can_release()
    # Credentials are supplied by the GEM_HOST_API_KEY envvar, which in turn
    # is set from the repository secrets by GitHub Actions.
    subprocess.check_call(
        [install.GEM_EXECUTABLE, "push", *glob("hypothesis-specs-*.gem")])
def upload_distribution():
    tools.assert_can_release()

    subprocess.check_call([
        sys.executable,
        "-m",
        "twine",
        "upload",
        "--skip-existing",
        "--config-file",
        tools.PYPIRC,
        os.path.join(DIST, "*"),
    ])

    # Construct plain-text + markdown version of this changelog entry,
    # with link to canonical source.
    build_docs(builder="text")
    textfile = os.path.join(HYPOTHESIS_PYTHON, "docs", "_build", "text",
                            "changes.txt")
    with open(textfile) as f:
        lines = f.readlines()
    entries = [i for i, l in enumerate(lines) if CHANGELOG_HEADER.match(l)]
    changelog_body = "".join(lines[entries[0] + 2:entries[1]]).strip() + (
        "\n\n*[The canonical version of these notes (with links) is on readthedocs.]"
        "(https://hypothesis.readthedocs.io/en/latest/changes.html#v%s)*" %
        (current_version().replace(".", "-"), ))

    # Create a GitHub release, to trigger Zenodo DOI minting.  See
    # https://developer.github.com/v3/repos/releases/#create-a-release
    requests.post(
        "https://api.github.com/repos/HypothesisWorks/hypothesis/releases",
        json={
            "tag_name": tag_name(),
            "name": "Hypothesis for Python - version " + current_version(),
            "body": changelog_body,
        },
        timeout=120,  # seconds
        # Scoped personal access token, stored in Travis environ variable
        auth=("Zac-HD", os.environ["Zac_release_token"]),
    ).raise_for_status()

    # Post the release notes to Tidelift too - see https://tidelift.com/docs/api
    requests.post(
        "https://api.tidelift.com/external-api/lifting/pypi/hypothesis/release-notes/"
        + current_version(),
        json={
            "body": changelog_body
        },
        headers={
            "Authorization":
            "Bearer {}".format(os.environ["TIDELIFT_API_TOKEN"])
        },
        timeout=120,  # seconds
    ).raise_for_status()
def upload_distribution():
    tools.assert_can_release()
    subprocess.check_call([
        sys.executable,
        '-m',
        'twine',
        'upload',
        '--config-file',
        tools.PYPIRC,
        os.path.join(DIST, '*'),
    ])
def upload_distribution():
    """Upload the built package to crates.io."""
    tools.assert_can_release()

    # Yes, cargo really will only look in this file. Yes this is terrible.
    # This only runs on Travis, so we may be assumed to own it, but still.
    unlink_if_present(CARGO_CREDENTIALS)

    # symlink so that the actual secret credentials can't be leaked via the
    # cache.
    os.symlink(tools.CARGO_API_KEY, CARGO_CREDENTIALS)

    # Give the key the right permissions.
    os.chmod(CARGO_CREDENTIALS, int("0600", 8))

    cargo("publish")
def upload_distribution():
    """Upload the built package to crates.io."""
    tools.assert_can_release()

    # Yes, cargo really will only look in this file. Yes this is terrible.
    # This only runs on Travis, so we may be assumed to own it, but still.
    unlink_if_present(CARGO_CREDENTIALS)

    # symlink so that the actual secret credentials can't be leaked via the
    # cache.
    os.symlink(tools.CARGO_API_KEY, CARGO_CREDENTIALS)

    # Give the key the right permissions.
    os.chmod(CARGO_CREDENTIALS, int("0600", 8))

    cargo("publish")
示例#7
0
def upload_distribution():
    """Upload the built package to rubygems."""
    tools.assert_can_release()

    # Yes, rubygems really will only look in this file. Yes this is terrible.
    # This only runs on Travis, so we may be assumed to own it, but still.
    unlink_if_present(RUBYGEMS_CREDENTIALS)

    # symlink so that the actual secret credentials can't be leaked via the
    # cache.
    os.symlink(tools.RUBYGEMS_API_KEY, RUBYGEMS_CREDENTIALS)

    # Give the key the right permissions.
    os.chmod(RUBYGEMS_CREDENTIALS, int('0600', 8))

    subprocess.check_call(
        [install.GEM_EXECUTABLE, 'push', *glob('hypothesis-specs-*.gem')])
def upload_distribution():
    """Upload the built package to rubygems."""
    tools.assert_can_release()

    # Yes, rubygems really will only look in this file. Yes this is terrible.
    # This only runs on Travis, so we may be assumed to own it, but still.
    unlink_if_present(RUBYGEMS_CREDENTIALS)

    # symlink so that the actual secret credentials can't be leaked via the
    # cache.
    os.symlink(tools.RUBYGEMS_API_KEY, RUBYGEMS_CREDENTIALS)

    # Give the key the right permissions.
    os.chmod(RUBYGEMS_CREDENTIALS, int('0600', 8))

    subprocess.check_call([
        install.GEM_EXECUTABLE, 'push', *glob('hypothesis-specs-*.gem')
    ])
示例#9
0
def upload_distribution():
    tools.assert_can_release()

    subprocess.check_call(
        [
            sys.executable,
            "-m",
            "twine",
            "upload",
            "--skip-existing",
            "--username=__token__",
            os.path.join(DIST, "*"),
        ]
    )

    # Construct plain-text + markdown version of this changelog entry,
    # with link to canonical source.
    build_docs(builder="text")
    textfile = os.path.join(HYPOTHESIS_PYTHON, "docs", "_build", "text", "changes.txt")
    with open(textfile) as f:
        lines = f.readlines()
    entries = [i for i, l in enumerate(lines) if CHANGELOG_HEADER.match(l)]
    anchor = current_version().replace(".", "-")
    changelog_body = (
        "".join(lines[entries[0] + 2 : entries[1]]).strip()
        + "\n\n*[The canonical version of these notes (with links) is on readthedocs.]"
        f"(https://hypothesis.readthedocs.io/en/latest/changes.html#v{anchor})*"
    )

    # Create a GitHub release, to trigger Zenodo DOI minting.  See
    # https://developer.github.com/v3/repos/releases/#create-a-release
    requests.post(
        "https://api.github.com/repos/HypothesisWorks/hypothesis/releases",
        json={
            "tag_name": tag_name(),
            "name": "Hypothesis for Python - version " + current_version(),
            "body": changelog_body,
        },
        timeout=120,  # seconds
        auth=("Zac-HD", os.environ["GH_TOKEN"]),
    ).raise_for_status()
def upload_distribution():
    tools.assert_can_release()
    subprocess.check_call([
        sys.executable, '-m', 'twine', 'upload',
        '--config-file', tools.PYPIRC,
        os.path.join(DIST, '*'),
    ])
    # Create a GitHub release, to trigger Zenodo DOI minting.  See
    # https://developer.github.com/v3/repos/releases/#create-a-release
    requests.post(
        'https://api.github.com/repos/HypothesisWorks/hypothesis/releases',
        json=dict(
            tag_name=tag_name(),
            name='Hypothesis for Python - version ' + current_version(),
            body=('You can [read the changelog for this release here]('
                  'https://hypothesis.readthedocs.io/en/latest/changes.html#v'
                  '%s).' % (current_version().replace('.', '-'),)),
        ),
        timeout=120,  # seconds
        # Scoped personal access token, stored in Travis environ variable
        auth=('Zac-HD', os.environ['Zac_release_token']),
    ).raise_for_status()
示例#11
0
def upload_distribution():
    """Upload the built package to crates.io."""
    tools.assert_can_release()
    # Credentials are supplied by the CARGO_REGISTRY_TOKEN envvar, which in turn
    # is set from the repository secrets by GitHub Actions.
    cargo("publish")