cloudflare / cfdeploy

Cloudflare Deployment Tool
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

Add support for docker images with long git rev strings #8

Open tlianza opened 6 years ago

tlianza commented 6 years ago

At present cfdeploy runs git rev-parse --short which doesn't have a guaranteed /predictable behavior across repos or git versions. In order to integrate cfdeploy with other tools, it would be great to support either a custom length, or full length git revision as a variable.

ryan0x44 commented 6 years ago

Agreed! I suggest we add GitRev (or if that's ambiguous, GitRevFull), and then if you want to truncate you can just do something like tagTemplate: "{{ printf "%.10s" .GitRev }}" to truncate to 10 characters. Thoughts?