Sha256: 48cc1873b1a28779aa382a98dda6fbf88a40d3e12a79467e54165cfce8f1a0fe

Contents?: true

Size: 875 Bytes

Versions: 17

Compression:

Stored size: 875 Bytes

Contents

namespace :cul do
  desc "Add tag based on current version from VERSION file"
  task :auto_tag do
    current_version = "v#{IO.read("VERSION").strip}"

    ask(:tag, current_version)
    tag = fetch(:tag)

    system("git tag -a #{tag} -m 'auto-tagged' && git push origin --tags")
  end

  desc "Deploy downtime branch"
  task :downtime do
    on roles(:web) do
      downtime_path = deploy_path.join("downtime")
      execute :rm, "-rf", downtime_path if test "[ -d #{downtime_path} ]"
      execute :mkdir, "-p", downtime_path

      within repo_path do
        execute :git, :archive, 'downtime', "| #{SSHKit.config.command_map[:tar]} -x -f - -C", downtime_path
      end

      tmp_current_path = releases_path.join(current_path.basename)
      execute :ln, "-s", downtime_path, tmp_current_path
      execute :mv, tmp_current_path, current_path.parent
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
capistrano-cul-0.0.17 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.16 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.15 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.14 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.13 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.12 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.11 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.10 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.9 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.8 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.7 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.6 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.5 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.4 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.3 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.2 lib/capistrano/tasks/cul.cap
capistrano-cul-0.0.1 lib/capistrano/tasks/cul.cap