Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix Copying Composer from previous release #330

Closed
wants to merge 2 commits into from

3 participants

@piotrantosik

Before:

*** [err :: server] cp: `/home/domain/releases/20130204152210/composer.phar' and `/home/domain/releases/20130204152210/composer.phar' are the same file
*** [deploy:update_code] rolling back

After change work fine.

@piotrantosik piotrantosik Fix Copying Composer from previous release
Before:
```
*** [err :: server] cp: `/home/domain/releases/20130204152210/composer.phar' and `/home/domain/releases/20130204152210/composer.phar' are the same file
*** [deploy:update_code] rolling back
```

After change work fine.
82f5037
@willdurand
Collaborator

I guess it's wrong. Shouldn't it be from latest_release to current_path instead?

@piotrantosik

@willdurand you're right, but in my previous_release indicated on latest_release and error occur

@willdurand
Collaborator

err, what?

@piotrantosik

capifony 2.2.7, task:
Copying Composer from previous release
and i have error:

*** [err :: server] cp: `/home/domain/releases/20130204152210/composer.phar' and `/home/domain/releases/20130204152210/composer.phar' are the same file

I suppose that {previous_release} points to the same folder as {latest_release}

run "#{try_sudo} sh -c 'cp #{previous_release}/composer.phar #{latest_release}/'"
@willdurand
Collaborator

Yes, that's why I said latest_release to current_path.

@piotrantosik

Hmm, i try it on different server and the result is:
testing server

print "#{latest_release} #{previous_release} #{current_path}" 
releases/20130205103545 releases/20130205103545 current

variable latest_release = previous_release
on production server is good

print "#{latest_release} #{previous_release} #{current_path}" 
releases/20130205104926 releases/20130205104605 current

So probably this is capistrano issue?

@willdurand
Collaborator

Don't think so... What should we do then?

@LouTerrailloune

May be you should simply remove this stuff and say in the docs that composer must be installed (globaly) on the server before setting use_composer to true.

@willdurand
Collaborator

don't know...

@piotrantosik

temporarily removed this code:

if remote_file_exists?("#{previous_release}/composer.phar")
        capifony_pretty_print "--> Copying Composer from previous release"
        print "#{latest_release} #{previous_release} #{current_path}"  
        run "#{try_sudo} sh -c 'cp #{previous_release}/composer.phar #{latest_release}/'"
        capifony_puts_ok
      end
@willdurand
Collaborator

Removing this code will introduce a BC break. Could you live with that?

@piotrantosik

No, everything works fine. Just composer is downloaded each time and not copied from a previous release.

@willdurand
Collaborator

then, let's remove the code you pasted 18 days ago.

@willdurand
Collaborator

merged, thanks!

@willdurand willdurand closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 4, 2013
  1. @piotrantosik

    Fix Copying Composer from previous release

    piotrantosik authored
    Before:
    ```
    *** [err :: server] cp: `/home/domain/releases/20130204152210/composer.phar' and `/home/domain/releases/20130204152210/composer.phar' are the same file
    *** [deploy:update_code] rolling back
    ```
    
    After change work fine.
Commits on Mar 5, 2013
  1. @piotrantosik

    Update symfony.rb

    piotrantosik authored
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 5 deletions.
  1. +0 −5 lib/symfony2/symfony.rb
View
5 lib/symfony2/symfony.rb
@@ -97,11 +97,6 @@
namespace :composer do
desc "Gets composer and installs it"
task :get, :roles => :app, :except => { :no_release => true } do
- if remote_file_exists?("#{previous_release}/composer.phar")
- capifony_pretty_print "--> Copying Composer from previous release"
- run "#{try_sudo} sh -c 'cp #{previous_release}/composer.phar #{latest_release}/'"
- capifony_puts_ok
- end
if !remote_file_exists?("#{latest_release}/composer.phar")
capifony_pretty_print "--> Downloading Composer"
Something went wrong with that request. Please try again.