diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-20 21:26:36 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-20 21:26:36 +0900 |
| commit | 1abac345cf409c930f7ab973de36dca4ba4b0931 (patch) | |
| tree | b2e42884c11bd993b4876e6c4ee2dafe60864359 /tasks/mruby_build_commands.rake | |
| parent | 21ae09c0a05041a1bc08e274d26fca88be3fa7c0 (diff) | |
| parent | 874bec2af5800b0847d702999efbe796b1c20cfa (diff) | |
| download | mruby-1abac345cf409c930f7ab973de36dca4ba4b0931.tar.gz mruby-1abac345cf409c930f7ab973de36dca4ba4b0931.zip | |
Merge pull request #2086 from bovi/checksum_hash
Implement :checksum_hash mrbgem option
Diffstat (limited to 'tasks/mruby_build_commands.rake')
| -rw-r--r-- | tasks/mruby_build_commands.rake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index d64b20ff3..4beb7e743 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -228,14 +228,15 @@ module MRuby class Command::Git < Command attr_accessor :flags - attr_accessor :clone_options, :pull_options + attr_accessor :clone_options, :pull_options, :checkout_options def initialize(build) super @command = 'git' - @flags = %w[--depth 1] + @flags = %w[] @clone_options = "clone %{flags} %{url} %{dir}" @pull_options = "pull" + @checkout_options = "checkout %{checksum_hash}" end def run_clone(dir, url, _flags = []) @@ -250,6 +251,14 @@ module MRuby _run pull_options Dir.chdir root end + + def run_checkout(dir, checksum_hash) + root = Dir.pwd + Dir.chdir dir + _pp "GIT CHECKOUT", checksum_hash + _run checkout_options, { :checksum_hash => checksum_hash } + Dir.chdir root + end end class Command::Mrbc < Command |
