>
> I'm not sure how to assign the output of a command to a variable within
> config/deploy.rb that can then be later included in an execute command.


Exactly like that, variables are variables. You could use the set()/fetch()
API, but there's no need.

Also http://ruby-doc.org/core-1.9.3/File.html#method-c-basename

Lee Hambley
http://lee.hambley.name/
+49 (0) 170 298 5667

On 25 February 2015 at 20:12, <deadbeef...@gmail.com> wrote:

>
> Sorry my brain was thinking config/deploy.rb and not shell.
>
> If I was in a shell I could do
>
> var=` basename /var/www/app/release/201501222`
> echo $var
>
> I'm not sure how to assign the output of a command to a variable within
> config/deploy.rb that can then be later included in an execute command.
>
> --d
>
>
> On Wednesday, February 25, 2015 at 12:50:15 PM UTC-6, Lee Hambley wrote:
>>
>> http://en.wikipedia.org/wiki/Basename
>>
>> Lee Hambley
>> http://lee.hambley.name/
>> +49 (0) 170 298 5667
>>
>> On 25 February 2015 at 19:38, <deadb...@gmail.com> wrote:
>>
>>>
>>> If release_path = /Deploy/nrpe/releases/20150225183149
>>>
>>> Is there a variable to access the 20150225183149 part?  Or some other
>>> method?
>>>
>>>
>>>
>>> Thank you
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Capistrano" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to capistrano+...@googlegroups.com.
>>> To view this discussion on the web, visit https://groups.google.com/d/
>>> msgid/capistrano/3d2e61f8-8040-481f-ab30-53c9cfaab13a%40googlegroups.com
>>> <https://groups.google.com/d/msgid/capistrano/3d2e61f8-8040-481f-ab30-53c9cfaab13a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to capistrano+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/d90f7656-d23e-4aad-8b66-4139527c1451%40googlegroups.com
> <https://groups.google.com/d/msgid/capistrano/d90f7656-d23e-4aad-8b66-4139527c1451%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLU08UHF0jY7puo94ZbYZBHcW5XKS8mkKmm1e7EXn6wP-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to