Capistrano 3 deploy -- copy file to release folder

220 Views Asked by At

I need to copy a file during deployment to the new deploy path. So I need a path like

<project_path>/releases/20201005215208/db/seeds.rb

I can't use the 'current' directory as it is pointing to the previous release (Link has not yet been updated). There used to be a path variable for that, but apparently it no longer exists.

What is the current method of doing this?

1

There are 1 best solutions below

0
rustyshamrock On

OK, what I was looking for was the variable "release_path". I had tried that and was getting the error that it didn't exist. The problem was that I was hooking the task in before the directory in the releases folder was created. Hook it in "before :updating" and it works like a champ! Yea!