ansistrano / deploy

Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
https://ansistrano.com
MIT License
2.37k stars 343 forks source link

REVISION / release path compatibility with Capistrano #272

Closed s01ipsist closed 6 years ago

s01ipsist commented 6 years ago

ansistrano_release_version defaults to a timestamp https://github.com/ansistrano/deploy/blob/master/tasks/update-code.yml#L5

and is used in both the release path https://github.com/ansistrano/deploy/blob/master/tasks/symlink.yml#L15

and to set the release version into REVISION file https://github.com/ansistrano/deploy/blob/master/tasks/update-code.yml#L16

In Capistrano these are different by default

REVISION is set to the commit SHA https://github.com/capistrano/capistrano/blob/master/lib/capistrano/scm.rb#L111

and a timestamp is used for the release path https://github.com/capistrano/capistrano/blob/master/lib/capistrano/dsl/paths.rb#L25

which does make more sense to me as REVISION allows you to inspect the deployed version, and release path timestamp allows you to know when it was deployed.

You could consider this a breaking change but would you consider a closer alignment with how Capistrano does this?

ricardclau commented 6 years ago

While I see some benefit to this approach in the git strategy, not all deployment strategies have a commit SHA (rsync, s3 downloads, etc) and we are not aiming to be an exact clone of Capistrano

ricardclau commented 6 years ago

Fixed in #288