mirror of
https://github.com/nishiki/swapus.git
synced 2025-02-21 07:40:04 +00:00
feat: add option version
This commit is contained in:
parent
6134b26dcc
commit
da7f5e7049
2 changed files with 6 additions and 0 deletions
|
@ -10,3 +10,4 @@ install:
|
|||
script:
|
||||
- rubocop
|
||||
- swapus
|
||||
- swapus -v | grep $(cat VERSION)
|
||||
|
|
|
@ -34,6 +34,11 @@ OptionParser.new do |opts|
|
|||
opts.on('-r', '--reverse', 'Reverse the result order') do
|
||||
reverse = true
|
||||
end
|
||||
|
||||
opts.on('-v', '--version', 'Show the version') do
|
||||
puts File.read("#{File.dirname(__FILE__)}/../VERSION")
|
||||
exit 0
|
||||
end
|
||||
end.parse!
|
||||
|
||||
SwapUsage.new(reverse).run
|
||||
|
|
Loading…
Add table
Reference in a new issue