{ "info": { "author": "ET", "author_email": "pavelr@final.israel", "bugtrack_url": null, "classifiers": [], "description": "# Version stamp package\n\nA simple package for auto increasing version numbers of any application agnostic to language or architecture. This package comes with three utilities:\n\n* `ver_stamp`\n* `goto_version`\n* `get_version`\n\n\n\n## Design\n\nThe main tool in this package is the `ver_stamp` tool. It is responsible of maintaining version numbers of different applications in an organization. Before we'll get into its usage, it's important to understand how it operates. The `ver_stamp` tool uses a back end to save the version information of all of the applications it maintains. The supported back ends are:\n\n* `git` [WIP]\n* `mercurial` - Fully supported\n\nAn additional `redis` back end is planned to be developed based on requirements.\n\n\n\n## Usage\n\nFirst thing first\n\n- Init a new repository called `versions` (Depends on the back-end type; `git` or `mercurial`)\n- Clone it to your build machine under `/path/to/your_repos/versions`\n\n\n\n### ver_stamp\n\nLet's say that your application's code is stored in a `git` repository called `my_app` and this repository's path is `/path/to/your_repos/my_app`\n\nIn order to stamp `my_app` you need to decide which back end you would like to use. Let's say that you've decided to go with the `git` back end. Perform the following steps:\n\n* Run the following command:\n\n```sh\nver_stamp --repos_path /path/to/your_repos/ \\\n--app_version_file /path/to/your_repos/versions/whatever/path/you/like/version.py \\\n--release_mode patch \\\n--app_name my_app\n```\n\nThe `ver_stamp` tool will create `whatever/path/you/like/version.py` inside the `versions` repository and make the necessary commits and push the whole thing. \n\n`--release_mode` supports `micro`, `patch`, `minor` and `major`\n\n**Illustration:**\n\n![ver_stamp](https://user-images.githubusercontent.com/5350434/55154276-09d0d480-515d-11e9-8add-f2cb42da3666.jpg)\n\n\nA typical contents of the `version.py` file would be:\n\n```python\n# Autogenerated by version stamper. Do not edit\nname = \"my_app\"\n_version = \"0.0.1.0\"\ntemplate = \"{0}.{1}.{2}\"\nversion = \"0.0.1\"\nrelease_mode = \"patch\"\nchangesets = {\"my_app\": {\"hash\": \"74c2c20aa5025e2ab3cf9ab046e67403df7cb124\", \"vcs_type\": \"git\"}}\n```\n\n\n\nThat's it! Enjoy stamping :)\n\n\n\n### goto_version\n\nThis utility is made for going back to a specific version. Let's say that you've released `my_app` with version of `2.0.3.4` a month ago. Let's also say that `my_app` depends on a list of other repositories: `repo_a` and `repo_b` Now you wish to go back to the exact commits in all of the repositories. All you have to do is to use `goto_version` tool and it will checkout and clone if necessary all of the relevant repositories **in parallel(!)**\n\n\n\n```sh\ngoto_version --repos_path /path/to/your_repos/ --app_name my_app --app_version 2.0.3.4\n--git_remote https://github.com/myname/\n```\n\n\n\nNow if you'd like to go back to the latest commits just run `goto_version`:\n\n```sh\ngoto_version --repos_path /path/to/your_repos/\n```\n\n\n\n### get_version\n\nA Very simple tool for printing the latest version of any app to stdout. \n\n```sh\nget_version --repos_path /path/to/your_repos/ --app_name my_app\n```\n\n\n\n## Advanced features\n\n### version_info.py\n\nBy default, `ver_stamp` tool will assume that everything under `/path/to/your_repos/` is required by your application. If you want to specify manually that your application depends on specific repositories, just create a file named `version_info.py` with the following content:\n\n```python\nrepos = ['my_app_repo', 'repo_a', 'repo_b']\n```\n\n\n\n### Micro services\n\n`ver_stamp` also supports stamping applications that are built with multiple sub applications. \n\nLet's assume that we have an application that consists of `service_a` and `service_b` and its called `my_system`. `service_a` and `service_b` have both versions of their own. We want to be able to advance `my_system` version every time `service_a` or `service_b` version is advanced. This is exactly what `ver_stamp` does. \n\nRun:\n\n```sh\nver_stamp --repos_path /path/to/your_repos \\\n--app_version_file /path/to/your_repos/versions/apps/my_system/service_a/version.py \\\n--app_name service_a \\\n--main_version_file /path/to/your_repos/versions/apps/my_system/main_version.py \\\n--release_mode patch\n```\n\n\n\nNow a new file will be generated, committed and pushed along with the `version.py` file that we already know.\n\nA typical contents of the `main_version.py` file would be:\n\n```python\n# Autogenerated by version stamper. Do not edit\nname = \"my_system\"\nbuild_num = \"1\"\nversion = \"19.03.1\"\nservices = {\n\"service_a\": {\"path\": \"/applications/my_system/service_a/version.py\", \"version\": \"0.0.1.0\"}}\nexternal_services = {\n}\n```\n\n\n\n#### Couple of notes:\n\n1. The `version` field is generated by the following format: `YY.MM.BUILD_NUM`\n\n2. `external_services` can be specified manually by committing to `versions` repository.\n\n\n\n### Simultaneous builds\n\n`ver_stamp` supports simultaneous builds. You can safely run multiple instances of `ver_stamp`\n\n\n\n## Installation\n\n```sh\npip3 install version-stamp\n```\n\n## How is that `ver_stamp` is agnostic to application language?\nIt is solely application's reposibility to actualy inject the version number that is in the `version.py` file to the application's code during its build phase. \n\n\n## Contributing\n\nIf you want to contribute to version-stamp development:\n\n1. Make a fresh fork of `ver_stamp` repository\n\n2. Modify code as you see fit\n\n3. Add tests to your feature\n\n4. Go to your Github fork and create new Pull Request\n\n\n\nWe will thank you for every contribution :)\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/final-israel/ver_stamp", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "version-stamp", "package_url": "https://pypi.org/project/version-stamp/", "platform": "", "project_url": "https://pypi.org/project/version-stamp/", "project_urls": { "Homepage": "https://github.com/final-israel/ver_stamp" }, "release_url": "https://pypi.org/project/version-stamp/0.0.6/", "requires_dist": [ "python-hglib (>=2.6)", "lockfile", "GitPython (>=2.1.11)" ], "requires_python": ">=3.5.0", "summary": "Stamping infrastructure", "version": "0.0.6" }, "last_serial": 5505382, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "d492244c14a586ff2697fc15c36b2e1d", "sha256": "ecd04259622b23f52ff4b47fb2221d2868f69c90028fca1c6414a9dc58b0bbc3" }, "downloads": -1, "filename": "version_stamp-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d492244c14a586ff2697fc15c36b2e1d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.0", "size": 16187, "upload_time": "2019-03-27T15:49:35", "url": "https://files.pythonhosted.org/packages/76/e6/bfa195ea05c84f82e63ffd0578b7aa8973fbd98f12852fd286556584fb2d/version_stamp-0.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed9e1472439da9e4fe2ad04b53003d6b", "sha256": "4e0d4abe726dd9af9833054e93e539a01f005d132a3217ec56e6236aa6f55796" }, "downloads": -1, "filename": "version_stamp-0.0.0.tar.gz", "has_sig": false, "md5_digest": "ed9e1472439da9e4fe2ad04b53003d6b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 9700, "upload_time": "2019-03-27T15:49:38", "url": "https://files.pythonhosted.org/packages/f1/36/3e4064c7fa862c43447cee1e4168ab820dc2a0d15c4cc23231d41d1b54d1/version_stamp-0.0.0.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "7acd6515e53fd79463157ec6dd398072", "sha256": "0a9690882f6796eda081f5c460198ea90b43b1179fb7982dab019c49b8138cd7" }, "downloads": -1, "filename": "version_stamp-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7acd6515e53fd79463157ec6dd398072", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.0", "size": 16068, "upload_time": "2019-03-27T13:01:34", "url": "https://files.pythonhosted.org/packages/0a/48/0738f65a3de74555e00de78cc7dd5ef240aedad3e565c66c6a8be4b62514/version_stamp-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cb6009eed8a7bd5231b8a154724a714b", "sha256": "da1aa917ac137a8a14b97ade6e752bae5b6863b0ee4f00d9d0366cee713cea3a" }, "downloads": -1, "filename": "version_stamp-0.0.2.tar.gz", "has_sig": false, "md5_digest": "cb6009eed8a7bd5231b8a154724a714b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 9651, "upload_time": "2019-03-27T13:01:36", "url": "https://files.pythonhosted.org/packages/a8/68/be5cf1386e1e1db8a6e99d65ffc29ede9d90fac13897e8b428ced4c9d79c/version_stamp-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "73ed23700ce569beb18a6206c807c31a", "sha256": "7b9590a6a1044175c16570de04189b29d73d757b41fbb0302fb621d41309409f" }, "downloads": -1, "filename": "version_stamp-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "73ed23700ce569beb18a6206c807c31a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.0", "size": 16113, "upload_time": "2019-03-27T16:00:04", "url": "https://files.pythonhosted.org/packages/7a/53/3d412b4140f6f0124423782d3530e915bdfc2a9efd6bbd4ab307ad3a12ab/version_stamp-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ffd0d8f24ac3a851efd31c2c15078886", "sha256": "c35e2ae6ed4767bed5bf3b1fa352a699c32c5ab4431cc1f24ae0efaee820dd82" }, "downloads": -1, "filename": "version_stamp-0.0.3.tar.gz", "has_sig": false, "md5_digest": "ffd0d8f24ac3a851efd31c2c15078886", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 9698, "upload_time": "2019-03-27T16:00:06", "url": "https://files.pythonhosted.org/packages/7c/ac/6f47752277fb35324ce3d962975054317d6ed1a6c6713e2fe1a192b924ec/version_stamp-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "cf01343dd2c5478dfdeaa7a0d9d996a7", "sha256": "7c37ef5078ff3227d113a91c86ba051bb3b9ee1b37964b50dcc5699cd0a0a787" }, "downloads": -1, "filename": "version_stamp-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "cf01343dd2c5478dfdeaa7a0d9d996a7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.0", "size": 17941, "upload_time": "2019-03-27T16:14:50", "url": "https://files.pythonhosted.org/packages/1b/ed/7a3f0b6ceaf454254c54261d9d7629ef8223af2023ca2d40433de5a13f84/version_stamp-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "26b75aa9a331677d45fd9695716be529", "sha256": "28e70272a60f15a471939f6bc54267fcbd7ed7a73779d99ae7c61f7697a7720e" }, "downloads": -1, "filename": "version_stamp-0.0.4.tar.gz", "has_sig": false, "md5_digest": "26b75aa9a331677d45fd9695716be529", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 11568, "upload_time": "2019-03-27T16:14:51", "url": "https://files.pythonhosted.org/packages/dd/70/d928ab549b289706ffebbe429a84288c2b92bbd8e67f74c11445eb52b5e9/version_stamp-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "ee29e4d7032fd53e5eed050526ff4c00", "sha256": "e4c1bf5b6772e5b9d4dfc4793dd98b92b855e5ee19746fa109921e0378cfd345" }, "downloads": -1, "filename": "version_stamp-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "ee29e4d7032fd53e5eed050526ff4c00", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.0", "size": 18381, "upload_time": "2019-03-28T11:09:41", "url": "https://files.pythonhosted.org/packages/5c/59/f9540306b21a52fe131a233352f90b8ee826f03759368cfcbf5988df442b/version_stamp-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74e942c23c6a4f3e9a5d7add967c3550", "sha256": "d0e7a99e91c11193d92ed6e9a2cb3b1430b2b5dbd2e8861bba39ddacf239c499" }, "downloads": -1, "filename": "version_stamp-0.0.5.tar.gz", "has_sig": false, "md5_digest": "74e942c23c6a4f3e9a5d7add967c3550", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 14024, "upload_time": "2019-03-28T11:09:43", "url": "https://files.pythonhosted.org/packages/58/82/ae5eceb4a42bddee66c0c34c2e84a6175677681e0615f99aeffc54334d36/version_stamp-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f6434f025bc2ed4f52df35009e97b01c", "sha256": "86a1d0b079c7b68b76b9148381545abcb4c113860532cfaae8ce245e6b7e195b" }, "downloads": -1, "filename": "version_stamp-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "f6434f025bc2ed4f52df35009e97b01c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.0", "size": 18800, "upload_time": "2019-07-09T07:52:50", "url": "https://files.pythonhosted.org/packages/7e/42/9bad3908cc77ab2a231352bbc9693c85b68a9cb759a105da3978ff434893/version_stamp-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b86b3acf3a2e4ffd56fdf55457255d12", "sha256": "c0285b6f77598bea397b8c1f37c3771acb4569aa1c41072e905a6ca5c78e3c5e" }, "downloads": -1, "filename": "version_stamp-0.0.6.tar.gz", "has_sig": false, "md5_digest": "b86b3acf3a2e4ffd56fdf55457255d12", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 14765, "upload_time": "2019-07-09T07:52:52", "url": "https://files.pythonhosted.org/packages/7f/b0/f3a3f412cfa0188cb101f85bbaf66b07f82e6a14379515e42da2f022d9c1/version_stamp-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f6434f025bc2ed4f52df35009e97b01c", "sha256": "86a1d0b079c7b68b76b9148381545abcb4c113860532cfaae8ce245e6b7e195b" }, "downloads": -1, "filename": "version_stamp-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "f6434f025bc2ed4f52df35009e97b01c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.0", "size": 18800, "upload_time": "2019-07-09T07:52:50", "url": "https://files.pythonhosted.org/packages/7e/42/9bad3908cc77ab2a231352bbc9693c85b68a9cb759a105da3978ff434893/version_stamp-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b86b3acf3a2e4ffd56fdf55457255d12", "sha256": "c0285b6f77598bea397b8c1f37c3771acb4569aa1c41072e905a6ca5c78e3c5e" }, "downloads": -1, "filename": "version_stamp-0.0.6.tar.gz", "has_sig": false, "md5_digest": "b86b3acf3a2e4ffd56fdf55457255d12", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 14765, "upload_time": "2019-07-09T07:52:52", "url": "https://files.pythonhosted.org/packages/7f/b0/f3a3f412cfa0188cb101f85bbaf66b07f82e6a14379515e42da2f022d9c1/version_stamp-0.0.6.tar.gz" } ] }