Skip to content

Commit

Permalink
Added dollar sign example
Browse files Browse the repository at this point in the history
  • Loading branch information
delano committed May 28, 2009
1 parent 085625c commit ff48144
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Rudyfile
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ routines do
end
end


anything do # $ rudy anything
before :display_uptime # Specify a dependency
script :rudy do # This is Ruby, so any valid syntax
Expand All @@ -176,7 +177,21 @@ routines do

display_uptime do # $ rudy display-uptime
script :rudy do # NOTE: You can use 'dashes' on the
uptime # command-line instead of underscores
uptime # command-line instead of underscores8
end
end

git_example do
before_local do
# Store variables using global variables. But be
# aware that the dollar sign variables can be set
# anywhere.
$sha = git 'rev-parse', '--short', 'HEAD'
$tagname = Time.now.strftime("%Y-%m-%d-#{Rudy.sysinfo.user}-#{$sha}")
git 'tag', :a, $tagname, :m, "Another release by Rudy"
end
after_local do
echo $tagname
end
end

Expand Down

0 comments on commit ff48144

Please sign in to comment.