History

Tweak thor docs:commit command

Thibaut Courouble committed 9 years ago

Commit a78e2a41 parent 339afc81 file · +1 −1Browse files

Unified · Split

lib/tasks/docs.thor+1−1
@@ -165,7 +165,7 @@ class DocsCLI < Thor · 164 unmodified lines
165 option :amend, type: :boolean165 option :amend, type: :boolean
166 def commit(name)166 def commit(name)
167 doc = Docs.find(name, false)167 doc = Docs.find(name, false)
168 message = options[:message] || "Update #{doc.name} documentation (#{doc.versions.map(&:release).join(', ')})"168 message = options[:message] || "Update #{doc.name} documentation (#{doc.versions.first.release})"
169 amend = " --amend" if options[:amend]169 amend = " --amend" if options[:amend]
170 system("git add assets/ *#{name}*") && system("git commit -m '#{message}'#{amend}")170 system("git add assets/ *#{name}*") && system("git commit -m '#{message}'#{amend}")
171 rescue Docs::DocNotFound => error171 rescue Docs::DocNotFound => error