mirror of
https://github.com/athityakumar/colorls.git
synced 2024-09-19 05:31:23 +02:00
Publish prereleases to rubygems
By default `gem list` only shows proper releases, use `gem list -r --pre` in order to list prereleases too. Use `gem install colorls --pre` to install a prerelease. See [here](https://guides.rubygems.org/patterns/#prerelease-gems) for details.
This commit is contained in:
parent
b354c01031
commit
e945c3ae7d
1 changed files with 13 additions and 1 deletions
|
@ -25,8 +25,20 @@ POST_INSTALL_MESSAGE = %(
|
||||||
|
|
||||||
# rubocop:disable Metrics/BlockLength
|
# rubocop:disable Metrics/BlockLength
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
|
is_tagged = ENV['TRAVIS_TAG'] == "v#{ColorLS::VERSION}"
|
||||||
|
is_origin = ENV['TRAVIS_REPO_SLUG'] == 'athityakumar/colorls'
|
||||||
|
build_number = ENV['TRAVIS_BUILD_NUMBER']
|
||||||
|
|
||||||
spec.name = 'colorls'
|
spec.name = 'colorls'
|
||||||
spec.version = ColorLS::VERSION
|
spec.version = if build_number && is_origin && !is_tagged
|
||||||
|
# Prereleasing on Travis CI
|
||||||
|
digits = ColorLS::VERSION.to_s.split '.'
|
||||||
|
digits[-1] = digits[-1].to_s.succ
|
||||||
|
|
||||||
|
digits.join('.') + ".pre.#{build_number}"
|
||||||
|
else
|
||||||
|
ColorLS::VERSION
|
||||||
|
end
|
||||||
spec.authors = ['Athitya Kumar']
|
spec.authors = ['Athitya Kumar']
|
||||||
spec.email = ['athityakumar@gmail.com']
|
spec.email = ['athityakumar@gmail.com']
|
||||||
spec.summary = "A Ruby CLI gem that beautifies the terminal's ls command, with color and font-awesome icons."
|
spec.summary = "A Ruby CLI gem that beautifies the terminal's ls command, with color and font-awesome icons."
|
||||||
|
|
Loading…
Reference in a new issue