1
0
Fork 0
mirror of https://github.com/nishiki/swapus.git synced 2024-10-27 02:33:18 +00:00

feat: add option version

This commit is contained in:
Adrien Waksberg 2018-02-01 23:34:13 +01:00
parent 6134b26dcc
commit da7f5e7049
2 changed files with 6 additions and 0 deletions

View file

@ -10,3 +10,4 @@ install:
script:
- rubocop
- swapus
- swapus -v | grep $(cat VERSION)

View file

@ -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