Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit 6600ab8

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 978938a commit 6600ab8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Rakefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ task :remove_output_dir do
1919
end
2020

2121
# Prompt user for a commit message; default: P U B L I S H :emoji:
22-
def commit_message
22+
def commit_message(no_commit_msg = false)
2323
publish_emojis = [':boom:', ':rocket:', ':metal:', ':bulb:', ':zap:',
2424
':sailboat:', ':gift:', ':ship:', ':shipit:', ':sparkles:', ':rainbow:']
2525
default_message = "P U B L I S H #{publish_emojis.sample}"
2626

27-
unless ENV["no_commit_msg"]
27+
unless no_commit_msg
2828
print "Enter a commit message (default: '#{default_message}'): "
2929
STDOUT.flush
3030
mesg = STDIN.gets.chomp.strip
@@ -35,9 +35,8 @@ def commit_message
3535
end
3636

3737
desc "Publish to http://developer.github.com"
38-
task :publish => [:clean, :remove_output_dir] do
39-
mesg = commit_message
40-
38+
task :publish, [:no_commit_msg] => [:clean, :remove_output_dir] do |t, args|
39+
mesg = commit_message(args[:no_commit_msg])
4140
sh "nanoc compile"
4241

4342
ENV['GIT_DIR'] = File.expand_path(`git rev-parse --git-dir`.chomp)

0 commit comments

Comments
 (0)