Skip to content

symlink to current is broken #79

@bcasci

Description

@bcasci

Hello.

I'm running into a strange problem that I hope someone can give me a pointer on. The deployment runs fine but the symlink to <deployment_root>/current is wrong. Each deployment creates a broken symlink to a release path beneath current. Logging in to the server and manually running "ln -s <any_release_path> current" instead of ln -nsf will correctly symlink a release path to current.

desc "Deploys the current version to the server."
task :deploy => :environment do
  deploy do
    invoke :'git:clone'
    invoke :'deploy:link_shared_paths'
    invoke :'bundle:install'
    to :launch do  
      queue "touch #{deploy_to}/shared/tmp/restart.txt"
    end
  end
end
$ mina deploy --verbose
# this is what's creating broken symlinks to current 
-----> Updating the current symlink
       $ ln -nfs "$release_path" "current"
# an ls of {deploy_to}/current shows this
$ ls -l /var/www/apps/recording-service/current/
total 0
lrwxrwxrwx 1 deployer deployer 10 Dec 23 09:55 1 -> releases/1
lrwxrwxrwx 1 deployer deployer 10 Dec 23 10:06 2 -> releases/2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions