| Q | A |
| --- | --- |
| Issue Type | Feature Request |
| Deployer Version | N/A |
| Local Machine OS | N/A |
| Remote Machine OS | N/A |
What the option name?
Maybe "commit"?
Your K. O.
What about "--git-commit-hash-sha-1"?
IMHO it is too long, coz git commit ref is always sha-1. If one day deployer would support hg or svn, then each VCS task would process commit ref independently. So I prefer short syntax for faster keyboard typing.
Maybe --git-commit-hash-always-uses-sha-1-but-not-in-hg-and-svn?
Never deploy a hash, always deploy a tag.
@oisvidi In case of git it makes no difference ;-) to deploy a hash, a branch or a tag, so in fact I would prefer the most generic solution. This would also be helpful for some automated deployments or some specific deployments, e.g. a git bisect-result.
@elfet At the moment deployer supports env('branch', '…') and I think that is totally ok, but there should also be a call like env('revision', '…') which is a generic call and the current implementation would only be a wrapper for that one, that could also be neat for other VCS e.g. svn in the future.
@spotman if you know that you are using git you are totally fine to use the first few characters to checkout the exact commit, you don't have to use all 40 chars.
@nemoinho if you deploy to staging and prod always use a tag, so you can see which commits are or where deployed when you look at the git repo from anywhere. Shouldn't a git bisect result be in a hotfix branch with a tag?
@oisvidi That's correct and I'm totally agree with that and will also prefer to only deploy tags. The only point which I want to underline was that we shoyld aspire a generic solution instead of a specific one. This is also relevant if we want to support other VCS than git. Because the API could be more consistent. And I like the idea that we can provide the functionality to deploy any state which the user wants to deploy.
Done! Now you can use --revision option. Can any one update docs for this?
@elfet Is this broken? Trying with both --commit=<hash> and --commit <hash> and neither is working.
Example:
./dep deploy stage --revision=048ea1b5e558ef421eada6887385513b07d8f14a
I see now that it's for the 4.0 milestone. Any way to do this on 3.3?
Simple. Add your own update code command and use tag.
Most helpful comment
Maybe
--git-commit-hash-always-uses-sha-1-but-not-in-hg-and-svn?