Closed wilfriedwolf closed 1 month ago
So you're saying adding this to your deploy.php
doesn't work anymore? That strikes me as odd.
set('release_name', function () {
return date('YmdHis');
});
No, actually I'm not saying that. Only I use deploy.yaml
not deploy.php
and I have not figured out yet how to write your above code in YAML ;) So basically I could
config.php
I really like the yaml way of configuring your deployment though..
I think we need to find a way to allow such configuration in YAML.
What about ability to add PHP code to yaml config?
Something like this:
tasks:
predeploy:
- run: date -u
- php: set('release_name', $prev);
Hej @antonmedv,
this could be a more general solution, yes. But actually it would be sufficient to allow this on parameters like:
config:
release_name:
- php: date('YmdHis');
Which would parse to:
set('release_name', function () {
return date('YmdHis');
});
This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.
Read more: [https://github.com/deployphp/deployer/discussions/3888]
In older versions there was the possibility to have the timestamp (format YmdHis) as release number. I would love to have this back and it could be optionally enabled by adding
somewhere and then overriding the default e.g. in the deploy.yaml
I could make a PR, only where should I put the set function best?
recipe/deploy/release.php
I guess?Best regards, Willi
Upvote & Fund