Sha256: 2a9f29c194f4098649331668d4e96ad2a4a87ca6e4e0bf964a2b99d9f748ac34

Contents?: true

Size: 1.39 KB

Versions: 19

Compression:

Stored size: 1.39 KB

Contents

require "tmpdir"

namespace :bundle do
  namespace :complex do
    directory Bundle::TMP

    desc "Build complex bundle"
    task build: [Bundle::Complex::FILE, Bundle::Complex::TEST] do
      say "Complex bundle has been stored @ #{Bundle::Complex::FILE}"
    end

    desc "Rebuild complex bundle"
    task rebuild: [:flush, Bundle::Complex::BUILD]

    desc "Remove complex bundle"
    task :flush do
      rm_f Bundle::Complex::FILE
      rm_rf Bundle::Complex::REPO
    end

    desc "Test repo by cloning to local directory"
    task test: Bundle::Complex::FILE do
      Dir.mktmpdir do |repo|
        sh "git clone", Bundle::Complex::FILE, repo, "--branch master"
        cd repo do
          sh "git rev-list --count HEAD"
          sh "git ls-files"
          sh "git status"
        end
      end

      say "Finished testing complex bundle"
    end

    file Bundle::Complex::FILE => Bundle::Complex::REPO do
      cd Bundle::Complex::REPO do
        sh "git bundle create", Bundle::Complex::FILE, "--branches --tags"
      end
    end

    file Bundle::Complex::REPO do
      sh "git clone", Bundle::Complex::GITHUB, Bundle::Complex::REPO, "--branch", "master"

      cd Bundle::Complex::REPO do
        sh "git", "reset --hard 27fec8"

        sh "git config user.email 'not-my@real-email.com'"
        sh "git config user.name 'John Doe'"

        sh "git tag", Bundle::Complex::TAG
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rfix-1.4.1 tasks/complex.rake
rfix-1.4.0.pre.201 tasks/complex.rake
rfix-1.4.0 tasks/complex.rake
rfix-1.3.0.pre.199 tasks/complex.rake
rfix-1.2.6.pre.198 tasks/complex.rake
rfix-1.2.6 tasks/complex.rake
rfix-1.2.2.pre.174 tasks/complex.rake
rfix-1.2.5 tasks/complex.rake
rfix-1.2.4 tasks/complex.rake
rfix-1.2.3.pre tasks/complex.rake
rfix-1.2.2.pre tasks/complex.rake
rfix-1.2.2.pre.172 tasks/complex.rake
rfix-1.2.2 tasks/complex.rake
rfix-1.1.0.pre.150 tasks/complex.rake
rfix-1.2.0 tasks/complex.rake
rfix-1.1.4.pre tasks/complex.rake
rfix-1.1.1.pre tasks/complex.rake
rfix-1.1.0.pre.149 tasks/complex.rake
rfix-1.1.0.pre.147 tasks/complex.rake