-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use date('YmdHis') instead of an integer value to represent a release. #174
Use date('YmdHis') instead of an integer value to represent a release. #174
Conversation
Well, why use And i think number for releases is more readable for humans:
|
+1 for YmdHis |
I agree that numbers are more readable and that I think it might be that if you are releasing to many servers at once and that the release name is On the other hand though, it would still be possible to have some sort of centralized numbering system so that any deployment to many server deploys to the same release folder number. |
👍 |
@tomzx i agree. But what if we get differences in last |
@Elfet, that's why I said we get the timestamp/datetime from the deployment machine (aka your desktop/laptop) not the deployed "at" machine. This value is exactly the same for every deployment on every machine. Some simple like this in your recipe file: $release = date('YmdHis');
task('deploy:release', function () use ($release) {
$releasePath = "{deploy_path}/releases/$release";
run("mkdir $releasePath");
run("cd {deploy_path} && if [ -e release ]; then rm release; fi");
run("ln -s $releasePath {deploy_path}/release");
})->desc('Prepare release'); |
if (!empty($releases)) { | ||
$release = (int)$releases[0] + 1; | ||
} | ||
$release = date('YmdHis'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In current implementation of this feature in PR we get this: then deploy process in sequence on every server we get +20 sec, +40 sec, +60 sec for every release on every server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I can fix it if we go forward with this change.
So what everybody think? @gordalina? |
Both approaches are valid. I would go for YmdHis, because it's the standard in deployment tools. |
@gordalina Agreed. I thought about the same thing, but I decided against suggesting it for the sake of keeping the system simple (as we'd have to handle both case and consider them when making any changes in the future). |
…older-name Use date('YmdHis') instead of an integer value to represent a release.
Done! |
@Elfet Looks like you went a bit fast there. The |
No description provided.