Skip to content

Commit

Permalink
implement -v for docker-sync-stack #349
Browse files Browse the repository at this point in the history
  • Loading branch information
EugenMayer committed May 5, 2017
1 parent 8ce745d commit 69fdd34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tasks/stack/stack.thor
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ class Stack < Thor
class_option :sync_name, :aliases => '-n', :type => :string, :desc => 'If given, only this sync configuration will be references/started/synced'
class_option :version, :aliases => '-v',:type => :boolean, :default => false, :desc => 'prints out the version of docker-sync and exits'

desc 'start', 'Start sync services, watcher and then your docker-compose defined stack'
desc '--version, -v', 'Prints out the version of docker-sync and exits'
def print_version
puts UpgradeChecker.get_current_version
exit(0)
end
map %w[--version -v] => :print_version

desc 'start', 'Start sync services, watcher and then your docker-compose defined stack'
def start
if options[:version]
puts UpgradeChecker.get_current_version
Expand Down

0 comments on commit 69fdd34

Please sign in to comment.