{ "info": { "author": "Chris Withers", "author_email": "chris@withers.org", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "|CircleCI|_\n\n.. |CircleCI| image:: https://circleci.com/gh/cjw296/carthorse/tree/master.svg?style=shield\n.. _CircleCI: https://circleci.com/gh/cjw296/carthorse/tree/master\n\nCarthorse\n=========\n\nSafely creating releases when you change the version number.\n\nYou use it by adding configuration to a yaml or toml file, and then adding the following\nto your continuous integration pipeline::\n\n pip install -U carthorse\n carthorse\n\nTOML Configuration\n------------------\n\nYour file should contain a section such as the following::\n\n [tool.carthorse]\n version-from = \"poetry\"\n tag-format = \"v{version}\"\n when = [\n \"version-not-tagged\"\n ]\n actions = [\n { run=\"poetry publish --username $POETRY_USER --password $POETRY_PASS --build\"},\n { name=\"create-tag\"},\n ]\n\nThis is designed so that it can be included as part of a ``pyproject.toml`` file.\n\nYAML Configuration\n------------------\n\nYour file should contain a section such as the following::\n\n carthorse:\n version-from: poetry\n tag-format: v{version}\n when:\n - version-not-tagged\n actions:\n - run: \"poetry publish --username $POETRY_USER --password $POETRY_PASS --build\"\n - create-tag\n\nWhat does it do?\n----------------\n\nRoughly speaking:\n\n- Extract your project's version from its source code.\n- Format a tag based on the version\n- Perform a number of checks, if any of those fail, stop.\n- Perform any actions you specify.\n\nVersion extraction\n------------------\n\nThe following methods of extracting the version of a project are currently supported:\n\n``setup.py``\n This will run ``python setup.py --version`` and use the version returned.\n\n``poetry``\n This will parse a project's ``pyproject.toml`` and use the ``tool.poetry.version``\n key as the version for the project.\n\n``flit``\n This will extract the version from a flit-style ``__version__`` without importing\n the package. For example, if your module is called ``foobar``, this will look in either\n ``foobar/__init__.py`` or ``foobar.py``. The config for that would be::\n\n [tool.carthorse]\n version-from = { name=\"flit\", module=\"foobar\" }\n\n``path``\n\n This will extract the version from a specified file. By default, this will be the stripped\n contents of the whole file, but a pattern can be specified. This can be useful to extract\n the version from a ``setup.py`` without executing it. The config would that would be::\n\n [tool.carthorse]\n version-from = { name=\"path\", path=\"setup.py\", pattern=\"version='(?P[^']+)\" }\n\nTag formatting\n--------------\n\nThe ``tag-format`` configuration option lets you control the format of the version tag\nby specifying a python format string into which the version will be interpolated.\nThe default is ``v{version}``.\n\nPerforming checks\n-----------------\n\nEach check in the ``when`` configuration section will be performed in order. If any fail\nthen no actions will be performed.\n\nThe following checks are currently available:\n\n``version_not_tagged``\n This will pass if no current git tag exists for the version extracted from the poject.\n\n``never``\n A safety net and testing helper, this check will never pass.\n\nActions\n-------\n\nIf all the checks pass, then the actions listed are executed in order. If an error occurs\nduring the execution of an action, no further actions will be executed.\n\nThe following actions are currently available:\n\n``run``\n Run the specified command in a shell. The full environment will be passed through and\n ``$TAG`` will contain the tag computed from the tag format.\n\n``create_tag``\n This will create a git tag for the computed tag based on the extracted version and push\n it to the specified remote. By default, the ``origin`` remote is used.\n\nChanges\n-------\n\n1.2.0 (12 Sep 2020)\n~~~~~~~~~~~~~~~~~~~\n\n- Support extracting the project version from `flit`__-style project.\n\n __ https://flit.readthedocs.io/en/latest/index.html\n\n- Support extracting the project version from a file, or part of a file by regex.\n\n1.1.0 (1 Mar 2019)\n~~~~~~~~~~~~~~~~~~\n\n- Support extracting the project version from a ``setup.py``.\n\n- Support for other packages providing ``version-from``, ``when`` and ``actions`` callables.\n\n1.0.1 (27 Feb 2019)\n~~~~~~~~~~~~~~~~~~~\n\n- Better PyPI metadata.\n\n1.0.0 (27 Feb 2019)\n~~~~~~~~~~~~~~~~~~~\n\n- First release, supporting poetry and git tagging.\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cjw296/carthorse", "keywords": "", "license": "MIT", "maintainer": "Chris Withers", "maintainer_email": "chris@withers.org", "name": "carthorse", "package_url": "https://pypi.org/project/carthorse/", "platform": "", "project_url": "https://pypi.org/project/carthorse/", "project_urls": { "Homepage": "https://github.com/cjw296/carthorse", "Repository": "https://github.com/cjw296/carthorse" }, "release_url": "https://pypi.org/project/carthorse/1.2.0/", "requires_dist": [ "toml (>=0.10.0,<0.11.0)", "pyyaml (>=3.13,<4.0)" ], "requires_python": ">=3.6,<4.0", "summary": "Safely creating releases when you change the version number.", "version": "1.2.0" }, "last_serial": 5818975, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a5bfa67a3b44b600e150b6aa42823d8e", "sha256": "38dcd58fff84c21d7bbcd0f92083a8deb8556b0c0501b4170b113b884416ad86" }, "downloads": -1, "filename": "carthorse-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a5bfa67a3b44b600e150b6aa42823d8e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.7,<4.0", "size": 5635, "upload_time": "2019-02-27T09:34:40", "url": "https://files.pythonhosted.org/packages/8b/41/6712193ceb4f7c66c697e1d814bced6b9d4ebbf00f65a7fdb14751e5d1df/carthorse-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "615dada8e5505d49b4d6bd276de355ac", "sha256": "cd3af3f39fc0be91c71fbdf1e4403e313707b226889d5629e85d467969e0ca28" }, "downloads": -1, "filename": "carthorse-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "615dada8e5505d49b4d6bd276de355ac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 5598, "upload_time": "2019-02-27T09:15:13", "url": "https://files.pythonhosted.org/packages/8a/65/dc41ad72cbba3b1ce577a4ba35c06eccfe90a016bb6af26d1d47c36afad8/carthorse-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "82f42c79eab7665efbb95d9af906b793", "sha256": "92c85383e2fe2653ffb86178ba7dfb70d82337ef373b4aaae9bc92c7019e3121" }, "downloads": -1, "filename": "carthorse-0.1.0.tar.gz", "has_sig": false, "md5_digest": "82f42c79eab7665efbb95d9af906b793", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 2418, "upload_time": "2019-02-27T09:15:15", "url": "https://files.pythonhosted.org/packages/93/8a/7b40321b8bd92569ba35c7e067c2ac0ad8fa015d3833790f476f81327209/carthorse-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "96edfb0933ccd4062c2b69ab197f4f84", "sha256": "a265b60e4d39f44b8275e71856e7d45cc3ff4f354feca9cc977ebb6251d10158" }, "downloads": -1, "filename": "carthorse-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "96edfb0933ccd4062c2b69ab197f4f84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 5767, "upload_time": "2019-02-27T22:28:03", "url": "https://files.pythonhosted.org/packages/dd/12/b39c7fad32bab90ffcd4d27c762f085b8f2a18bb32984ae94c92b615753e/carthorse-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "83422f13c46321539e9b36df875bb6e8", "sha256": "ff1ba9491462efef7aad8fc00d88b0ab8652728734605f79cc6352f71c1be465" }, "downloads": -1, "filename": "carthorse-1.0.0.tar.gz", "has_sig": false, "md5_digest": "83422f13c46321539e9b36df875bb6e8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 2469, "upload_time": "2019-02-27T22:28:05", "url": "https://files.pythonhosted.org/packages/bd/12/76b43f5089cedcc7972d1e7415621e917d09c4e5e2195484a9d0fca02038/carthorse-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b08f163d0f76d2d581f762454cb1b699", "sha256": "de28b0eaa24c64d49593c98325e0698cff8c9c25093a3413b8557aa376d9704f" }, "downloads": -1, "filename": "carthorse-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b08f163d0f76d2d581f762454cb1b699", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 7028, "upload_time": "2019-02-27T22:35:48", "url": "https://files.pythonhosted.org/packages/06/c1/36188bd2b7906df7ad61bda1b93862e5adc6add7bcc4ad420b3b7e95dff8/carthorse-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "91ba2144342e3865aa02b00c966d6acd", "sha256": "85b5d41c575cf9d01d78e6c359f37c1feb6a738e0454b125af3c129fa2fdcc38" }, "downloads": -1, "filename": "carthorse-1.0.1.tar.gz", "has_sig": false, "md5_digest": "91ba2144342e3865aa02b00c966d6acd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 4096, "upload_time": "2019-02-27T22:35:50", "url": "https://files.pythonhosted.org/packages/27/62/e78fea5287ec56bd0ae999d733e03857db4387eae002e63fdd0e0df9525b/carthorse-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "95e18363c08887f50125754771a4d0ef", "sha256": "76b042d9e6f1c0d26058595049f6d8912853e2e95a836a5bc5de2ab225a01caa" }, "downloads": -1, "filename": "carthorse-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "95e18363c08887f50125754771a4d0ef", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 8115, "upload_time": "2019-03-01T08:37:22", "url": "https://files.pythonhosted.org/packages/3d/9e/afc885208214d3f7d9c811ff1b49670c7c6adfa0a87a0ecbfb323649c577/carthorse-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d9288d635801ca2351259841ae0bdfa", "sha256": "b374beb904e48b344ebe7201fc3b5d3ab3ba8166e5cacbbd6151ef76c6fcd6b3" }, "downloads": -1, "filename": "carthorse-1.1.0.tar.gz", "has_sig": false, "md5_digest": "2d9288d635801ca2351259841ae0bdfa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4657, "upload_time": "2019-03-01T08:37:24", "url": "https://files.pythonhosted.org/packages/b6/d7/9f5439c6a6edbc48283678ec46df0f6236a70233999e50ef2fe0d168867b/carthorse-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "0a2146cfdc13952c90a02add4019ba4e", "sha256": "38a38b8509f8a3fc5b6b7638c0cb4a9d83da496b45a862094221381aece3060c" }, "downloads": -1, "filename": "carthorse-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0a2146cfdc13952c90a02add4019ba4e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6339, "upload_time": "2019-09-12T08:43:36", "url": "https://files.pythonhosted.org/packages/d2/a0/d6b1ce6f71070184600612beb1ebd952a872f154ccec3ffb8baa47d05d12/carthorse-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6f691481a37472955d9f8df08704ccf", "sha256": "905b4ede4fa9fa7cf0ba04f4704367ea0af8c920f6686a12c0c2cad27bbc507d" }, "downloads": -1, "filename": "carthorse-1.2.0.tar.gz", "has_sig": false, "md5_digest": "c6f691481a37472955d9f8df08704ccf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5761, "upload_time": "2019-09-12T08:43:38", "url": "https://files.pythonhosted.org/packages/8a/d3/f9fc189300fe7828e752145c0ca5ec3babd04b9103c8338b561c703dd1ba/carthorse-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0a2146cfdc13952c90a02add4019ba4e", "sha256": "38a38b8509f8a3fc5b6b7638c0cb4a9d83da496b45a862094221381aece3060c" }, "downloads": -1, "filename": "carthorse-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0a2146cfdc13952c90a02add4019ba4e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6339, "upload_time": "2019-09-12T08:43:36", "url": "https://files.pythonhosted.org/packages/d2/a0/d6b1ce6f71070184600612beb1ebd952a872f154ccec3ffb8baa47d05d12/carthorse-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6f691481a37472955d9f8df08704ccf", "sha256": "905b4ede4fa9fa7cf0ba04f4704367ea0af8c920f6686a12c0c2cad27bbc507d" }, "downloads": -1, "filename": "carthorse-1.2.0.tar.gz", "has_sig": false, "md5_digest": "c6f691481a37472955d9f8df08704ccf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5761, "upload_time": "2019-09-12T08:43:38", "url": "https://files.pythonhosted.org/packages/8a/d3/f9fc189300fe7828e752145c0ca5ec3babd04b9103c8338b561c703dd1ba/carthorse-1.2.0.tar.gz" } ] }