Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shikhalev/set_version
Make gem version with autoicrement build number
https://github.com/shikhalev/set_version
Last synced: about 1 month ago
JSON representation
Make gem version with autoicrement build number
- Host: GitHub
- URL: https://github.com/shikhalev/set_version
- Owner: shikhalev
- License: lgpl-3.0
- Created: 2015-01-24T20:44:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-11T17:19:22.000Z (almost 10 years ago)
- Last Synced: 2024-08-09T08:33:41.792Z (3 months ago)
- Language: Ruby
- Size: 254 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# set_version
Make gem version with autoicrement build number.
[![Gem Version](https://badge.fury.io/rb/set_version.svg)](http://badge.fury.io/rb/set_version)
[![GitHub license](https://img.shields.io/badge/license-LGPLv3-orange.svg?style=flat)](https://raw.githubusercontent.com/shikhalev/set_version/master/LICENSE)
[![Code Climate](https://codeclimate.com/github/shikhalev/set_version/badges/gpa.svg)](https://codeclimate.com/github/shikhalev/set_version)```Ruby
set_version *vers, git: false, message: 'Build #%s', tag: false
```* `vers` — version numbers: major, minor, patch; and beta-flag — String
or Symbol like 'alpha', 'beta', 'pre', 'rc' etc.
* `git:` — named parameter — boolean. If set to `true`, method will check
where gemspec is under git control, add `gemvers`-file to git, and commit
with `message`.
* `message:` — template for git commit message, can use named placeholders:
* `:version` — result full version;
* `:major`, `:minor`, `:patch` and `:beta` — parameters of calling;
* `:build` — build number.
* `tag:` — if `true` and git enabled it is adding tag named by version.## Usage
```Ruby
Gem::Specification.new do |g|# some settings
# g.files = [. . .]
# important! files _must_ be set _before_ set_version callg.set_version 1, 0, 0, 'beta'
end
```See example in [gemspec](set_version.gemspec).
## License
* [GNU Lesser General Public License v3](LICENSE)