Exemple #1
0
Releaser(
    config,
    # ==================  Before releasing, do some checks  ===================
    Shell("py.test -s --tb=native tests"),  # First of all ensure tests pass
    # CheckRstFiles,  # Documentation: recursively verify ALL .rst files, or:
    CheckRstFiles("README.rst", "docs/LICENSE.rst"),  # just a few.
    EnsureGitClean,  # There are no uncommitted changes in tracked files.
    EnsureGitBranch,  # I must be in the branch specified in config
    # InteractivelyEnsureChangesDocumented,     # Did you update CHANGES.rst?
    # Shell("poetry install")  # Ensure the package can be installed
    # CheckTravis,  # We run this late, so travis-ci has more time to build
    # ======================  All checks pass. RELEASE!  ======================
    SetVersionNumberInteractively,  # Ask for version and write to source code
    Shell("./build_sphinx_documentation.sh"),  # You can write it easily
    Shell("poetry build"),  # Build sdist + wheel with poetry
    # Shell("python setup.py sdist"),  # Build source distribution with setuptools
    # Shell("python setup.py bdist_wheel"),  # Build binary wheel with setuptools
    InteractivelyApprovePackage,  # Ask user to manually verify wheel content
    GitCommitVersionNumber,
    GitTag,  # Locally tag the current commit with the new version number
    Shell("poetry publish"),  # Upload source and wheel to https://pypi.org
    # TwineUploadSource,  # Upload a source .tar.gz to https://pypi.org with Twine
    # TwineUploadWheel,  # Upload wheel to https://pypi.org with Twine
    # ===========  Post-release: set development version and push  ============
    SetFutureVersion,  # Writes incremented version, now with 'dev1' suffix
    GitCommitVersionNumber("future_version",
                           msg="Bump version to {0} after release"),
    # ErrorStep,  # You can use this step while testing - it causes a rollback.
    GitPush,  # Cannot be undone. If successful, previous steps won't roll back
    GitPushTags,
    Warn("Do not forget to upload the documentation now!"),
).release()
Exemple #2
0
Releaser(
    config,

    # ==================  Before releasing, do some checks  ===================
    Shell('python setup.py test'),  # First of all ensure tests pass
    # CheckRstFiles,  # Documentation: recursively verify ALL .rst files, or:
    CheckRstFiles('README.rst', 'docs/LICENSE.rst'),  # just a few.
    # TODO IMPLEMENT CompileAndVerifyTranslations,
    EnsureGitClean,  # There are no uncommitted changes in tracked files.
    EnsureGitBranch,  # I must be in the branch specified in config
    # InteractivelyEnsureChangesDocumented,     # Did you update CHANGES.rst?
    InteractivelyApproveDistribution,  # Generate sdist, let user verify it
    InteractivelyApproveWheel,  # Let user verify a temp wheel
    # CheckTravis,  # We run this late, so travis-ci has more time to build

    # ======================  All checks pass. RELEASE!  ======================
    SetVersionNumberInteractively,  # Ask for version and write to source code
    Shell('./build_sphinx_documentation.sh'),  # You can write it easily
    GitCommitVersionNumber,
    GitTag,  # Locally tag the current commit with the new version number
    PypiUpload,  # Make and upload a source .tar.gz to https://pypi.python.org
    PypiUploadWheel,  # Make and upload source wheel to https://pypi.python.org

    # ===========  Post-release: set development version and push  ============
    SetFutureVersion,  # Writes incremented version, now with 'dev' suffix
    GitCommitVersionNumber('future_version',
                           msg='Bump version to {0} after release'),
    # ErrorStep,  # You can use this step while testing - it causes a rollback.
    GitPush,  # Cannot be undone. If successful, previous steps won't roll back
    GitPushTags,
    Warn("Do not forget to upload the documentation!"),
).release()
# You can customize your release process below.
# Comment out any steps you don't desire and add your own steps.
Releaser(
    config,
    Shell("pytest"),  # First of all ensure tests pass
    # CheckRstFiles,  # Documentation: recursively verify ALL .rst files, or:
    # CheckRstFiles('CHANGES.rst', 'LICENSE.rst'),  # just a few.
    # TODO IMPLEMENT CompileAndVerifyTranslations,
    # TODO IMPLEMENT BuildSphinxDocumentation,
    # TODO IMPLEMENT Tell the user to upload the built docs (give URL)
    EnsureGitClean,  # There are no uncommitted changes in tracked files.
    EnsureGitBranch,  # I must be in the branch specified in config
    InteractivelyEnsureChangesDocumented,  # Did you update CHANGES.rst?
    # =================  All checks pass. RELEASE!  ===========================
    SetVersionNumberInteractively,  # Ask for version and write to source code
    # TODO IMPLEMENT CHANGES file: add heading for current version (below dev)
    GitCommitVersionNumber,
    GitTag,  # Locally tag the current commit with the new version number
    InteractivelyApproveDistribution,  # Generate sdist, let user verify it
    InteractivelyApproveWheel,  # Generate wheel, let user verify it
    PypiUpload,  # Make and upload a source .tar.gz to https://pypi.org
    PypiUploadWheel,  # Make and upload source wheel to https://pypi.org
    # ===========  Post-release: set development version and push  ============
    SetFutureVersion,  # Writes incremented version, now with 'dev' suffix
    GitCommitVersionNumber("future_version",
                           msg="Bump version to {0} after release"),
    GitPush,  # Cannot be undone. If successful, previous steps won't roll back
    GitPushTags,
).release()
Exemple #4
0
from releaser import Releaser

Releaser().release()
Exemple #5
0
# Comment out any steps you don't desire and add your own steps.
Releaser(
    config,
    Shell('python setup.py test'),  # First of all ensure tests pass
    CheckRstFiles,  # Documentation: recursively verify ALL .rst files, or:
    # CheckRstFiles('README.rst', 'CHANGES.rst', 'LICENSE.rst'),  # just a few.
    # TODO IMPLEMENT CompileAndVerifyTranslations,
    # TODO IMPLEMENT BuildSphinxDocumentation,
    # TODO IMPLEMENT Tell the user to upload the built docs (give URL)
    EnsureGitClean,  # There are no uncommitted changes in tracked files.
    EnsureGitBranch,  # I must be in the branch specified in config
    InteractivelyApproveDistribution,  # Generate sdist, let user verify it
    # InteractivelyEnsureChangesDocumented,     # Did you update CHANGES.rst?
    # CheckTravis,  # We run this late, so travis-ci has more time to build

    # =================  All checks pass. RELEASE!  ===========================
    SetVersionNumberInteractively,  # Ask for version and write to source code
    # TODO IMPLEMENT CHANGES file: add heading for current version (below dev)
    GitCommitVersionNumber,
    GitTag,  # Locally tag the current commit with the new version number
    PypiRegister,  # Creates the new release at http://pypi.python.org
    PypiUpload,  # Uploads a source distribution to http://pypi.python.org

    # ==========  Post-release: adjust repositories for new dev  ==========
    SetFutureVersion,  # Writes incremented version, now with 'dev' suffix
    GitCommitVersionNumber('future_version',
                           msg='Bump version to {0} after release'),
    GitPush,  # Cannot be undone. If successful, previous steps won't roll back
    GitPushTags,
).release()