Skip to content

Commit 9fcc821

Browse files
Gargronhiyuki2578
authored andcommitted
Add tootctl --version (mastodon#9835)
1 parent 2764954 commit 9fcc821

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/cli.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
require_relative 'mastodon/feeds_cli'
88
require_relative 'mastodon/settings_cli'
99
require_relative 'mastodon/domains_cli'
10+
require_relative 'mastodon/version'
1011

1112
module Mastodon
1213
class CLI < Thor
@@ -31,5 +32,12 @@ def self.exit_on_failure?
3132

3233
desc 'domains SUBCOMMAND ...ARGS', 'Manage account domains'
3334
subcommand 'domains', Mastodon::DomainsCLI
35+
36+
map %w(--version -v) => :version
37+
38+
desc 'version', 'Show version'
39+
def version
40+
say(Mastodon::Version.to_s)
41+
end
3442
end
3543
end

0 commit comments

Comments
 (0)