{"id":17412746,"url":"https://github.com/hattya/scmver","last_synced_at":"2025-04-15T20:23:57.935Z","repository":{"id":57464517,"uuid":"172936844","full_name":"hattya/scmver","owner":"hattya","description":"A package version manager based on SCM tags","archived":false,"fork":false,"pushed_at":"2025-02-07T14:03:31.000Z","size":197,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T01:03:35.035Z","etag":null,"topics":["bazaar","breezy","darcs","distutils","fossil","git","mercurial","packaging","python","setuptools","subversion","vcs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hattya.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-27T15:06:04.000Z","updated_at":"2025-02-07T14:03:35.000Z","dependencies_parsed_at":"2024-02-11T06:28:05.447Z","dependency_job_id":"ce8a0e88-a4c8-4a6d-a871-b288655c7764","html_url":"https://github.com/hattya/scmver","commit_stats":{"total_commits":104,"total_committers":1,"mean_commits":104.0,"dds":0.0,"last_synced_commit":"f0f6956498e74626cf82171b5ce930452f6357a0"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hattya%2Fscmver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hattya%2Fscmver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hattya%2Fscmver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hattya%2Fscmver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hattya","download_url":"https://codeload.github.com/hattya/scmver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249146405,"owners_count":21220129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bazaar","breezy","darcs","distutils","fossil","git","mercurial","packaging","python","setuptools","subversion","vcs"],"created_at":"2024-10-17T00:08:10.231Z","updated_at":"2025-04-15T20:23:57.915Z","avatar_url":"https://github.com/hattya.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"scmver\n======\n\nscmver is a package version manager based on SCM tags.\n\nIt can be used to pass the version to the ``setup`` function in a ``setup.py``,\nor to generate a file which contains the version.\n\n.. image:: https://img.shields.io/pypi/v/scmver.svg\n   :target: https://pypi.org/project/scmver\n\n.. image:: https://github.com/hattya/scmver/actions/workflows/ci.yml/badge.svg\n   :target: https://github.com/hattya/scmver/actions/workflows/ci.yml\n\n.. image:: https://ci.appveyor.com/api/projects/status/l9flwehcgr5pxi33?svg=true\n   :target: https://ci.appveyor.com/project/hattya/scmver\n\n.. image:: https://codecov.io/gh/hattya/scmver/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/hattya/scmver\n\n\nInstallation\n------------\n\n.. code:: console\n\n   $ pip install scmver\n\n\nRequirements\n------------\n\n- Python 3.9+\n- setuptools\n\n\nUsage\n-----\n\npyproject.toml\n--------------\n\n.. code:: toml\n\n   [build-system]\n   requires = [\n       \"setuptools \u003e= 42.0\",\n       \"scmver[toml] \u003e= 1.7\",\n   ]\n   build-backend = \"setuptools.build_meta\"\n\n   [tool.scmver]\n   spec = \"micro\"\n   write-to = \"scmver/__version__.py\"\n   fallback = {attr = \"scmver:__version__\"}\n\nwrite-to\n  An alias for ``write_to``, but it takes precedence.\n\nfallback\n  ``attr``\n    A ``string`` which is described in ``fallback`` in Configuration_.\n\n  ``path`` (optional)\n    A path to import the module.\n\nSee Configuration_ for key/value pairs.\n\n\nsetuptools\n~~~~~~~~~~\n\n.. code:: python\n\n   from setuptools import setup\n\n   setup(setup_requires=['scmver'],\n         scmver=True)\n\n``scmver`` is either following values:\n\n``True``\n  It is same as an empty ``dict``.\n\n``callable object``\n  It should return a ``dict``.\n\n``dict``\n  See Configuration_ for details.\n\n\ndistutils\n~~~~~~~~~\n\n.. code:: python\n\n   from distutils.core import setup\n\n   import scmver\n\n   setup(version=scmver.get_version())\n\nSee Configuration_ for the ``scmver.get_version`` arguments.\n\n\nConfiguration\n-------------\n\nroot\n  A path of the working directory.\n\n  Default: ``'.'``\n\nspec\n  A version specifier to construct the public version identifiers. It will be\n  incremented by the number of commits from the latest tag.\n\n  ``major``\n    It will increment the major version.\n\n  ``minor``\n    It will increment the minor version.\n\n  ``micro`` or ``patch``\n    It will increment the micro (patch) version.\n\n  ``post``\n    It will increment the post-release segment.\n\n  ``major.dev``\n    It will increment the development release segment after incrementing the\n    major version by 1.\n\n  ``minor.dev``\n    It will increment the development release segment after incrementing the\n    minor version by 1.\n\n  ``micro.dev`` or ``patch.dev``\n    It will increment the development release segment after incrementing the\n    micro (patch) version by 1.\n\n  Default: ``'post'``\n\nlocal\n  A ``string`` or ``callable object`` to construct the local version\n  identifiers.\n\n  ``string``\n    A format string.\n\n    Available keywords:\n\n    - ``{distance}``\n    - ``{revision}``\n    - ``{branch}``\n    - ``{utc}``      - Return value of ``datetime.datetime.now(datetime.timezone.utc)``\n    - ``{local}``    - Return value of ``datetime.datetime.now()``\n\n  ``callable object``\n    It will be called with ``scmver.core.SCMInfo``.\n\n  Default: ``'{local:%Y-%m-%d}'``\n\nversion\n  A regular expression object to extract the version from SCM tags. It should\n  contain the version group.\n\nwrite_to\n  A path to a file which will be generated using ``template``.\n\ntemplate\n  A format string which is used by ``write_to``.\n\n  Available keywords:\n\n  - ``{version}``\n  - ``{revision}``\n  - ``{branch}``\n\nfallback\n  It will be used when there is outside of a working copy.\n\n  ``string``\n    It is in the ``'package.module:some.attribute'`` format\n    (ex: ``'scmver:__version__'``).\n\n  ``list``\n    It consists of a ``string`` which is described above, and a path to import\n    the module.\n\n  ``callable object``\n    It should return the version.\n\nbazaar.tag\n  A regular expression pattern to filter tags.\n\ndarcs.tag\n  A regular expression pattern to filter tags.\n\nfossil.tag\n  A regular expression pattern to filter tags.\n\ngit.tag\n  It will be passed to ``git describe`` as ``--match``.\n\nmercurial.tag\n  A regular expression pattern to filter tags.\n\nsubversion.tag\n  A regular expression pattern to filter tags.\n\nsubversion.trunk\n  A relative repository path of the trunk directory.\n\n  Default: ``'trunk'``\n\nsubversion.branches\n  A relative repository path of the directory where branches are located.\n\n  Default: ``'branches'``\n\nsubversion.tags\n  A relative repository path of the directory where tags are located.\n\n  Default: ``'tags'``\n\n\nLicense\n-------\n\nscmver is distributed under the terms of the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhattya%2Fscmver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhattya%2Fscmver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhattya%2Fscmver/lists"}