Sha256: fc564e2d03253d591d427c99f2ff7e9433faac14e28838abdd04bf13c4003761

Contents?: true

Size: 1.51 KB

Versions: 4

Compression:

Stored size: 1.51 KB

Contents

namespace :bundle do
  namespace :simple do
    directory Bundle::Simple::REPO

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

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

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

    desc "Test repo by cloning to local directory"
    task test: Bundle::Simple::FILE do
      Dir.mktmpdir do |repo|
        sh "git clone", Bundle::Simple::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 simple bundle"
    end

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

    file Bundle::Simple::REPO do
      cd Bundle::Simple::REPO do
        touch ".gitignore"

        sh "git init"
        sh "git add .gitignore"
        sh "git commit -m 'A Commit Message'"

        sh "git config push.default current"
        sh "git config branch.autosetupmerge always"
        sh "git config branch.autosetuprebase always"

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rfix-1.1.0.pre.150 tasks/simple.rake
rfix-1.1.1.pre tasks/simple.rake
rfix-1.1.0.pre.149 tasks/simple.rake
rfix-1.1.0.pre.147 tasks/simple.rake