Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

capistano 3.2.x error - #{scm}:set_current_revision ? #15

Open
irobayna opened this issue Apr 19, 2014 · 1 comment
Open

capistano 3.2.x error - #{scm}:set_current_revision ? #15

irobayna opened this issue Apr 19, 2014 · 1 comment

Comments

@irobayna
Copy link

It appears something has changed in latest capistrano and now it requires #{scm}:set_current_revision

I have forked the code and added the following definition

    Rake::Task.define_task("#{scm}:set_current_revision") do
      invoke "rsync:current_revision" 
    end

but not sure how to implement

so far I have this, but the system is not deploying the proper files (Ubuntu 14.04)

  task :current_revision => %w[set_current_revision]

Any thoughts?

@gr8bit
Copy link

gr8bit commented May 7, 2014

Try adding this somewhere your deploy.rb. It uses the same mechanism to figure out the git-revision than Capistrano 2 did. You don't need to fork this capistrano-rsync for this "intermediate patch" to work.

 namespace :rsync do

  # internally needed by capistrano's "deploy.rake"
  task :set_current_revision do
    run_locally do
      within fetch(:rsync_stage) do
        rev = capture(:git, 'rev-parse', 'HEAD')
        set :current_revision, rev
      end
    end
  end

ezekg pushed a commit to ezekg/capistrano-rsync that referenced this issue Jan 4, 2016
…-for-tags

Usage of remote with tags cause fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants