Comments (2)
I see no difference between 20160425120500 than 2016-04-25_12:05:00. plus
characters like ":" and "." may be problematic ;)
2016-04-29 9:56 GMT+02:00 ju1ius [email protected]:
Hi,
I find the current way of naming release hard to read, especially if you
have several of them during the same day/hour.Couldn't it be a bit more human friendly in future versions ?
For example:// recipe/common.php/** * Release */task('deploy:release', function () { $releaseDir = env()->parse("{{deploy_path}}/releases"); $guard = 42; do { $time = microtime(); list($usec, $sec) = explode(' ', $time); $date = \DateTime::createFromFormat('U.u', $sec . '.' . ($usec * 1e6)); $releaseName = $date->format('Y-m-d_H:i:s.u'); $releasePath = $releaseDir . '/' . $releaseName; } while (is_dir($releasePath) && --$guard); env('release_name', $releaseName); run("mkdir $releasePath"); run("cd {{deploy_path}} && if [ -h release ]; then rm release; fi"); run("ln -s $releasePath {{deploy_path}}/release");})->desc('Prepare release');
This way you have releases that look like:
- releases
|-- 2016-04-25_12:05:00.011813
|-- 2016-04-25_18:01:02.614783
|-- 2016-04-26_12:00:03.314854
|-- 2016-04-26_18:03:00.214896
|-- 2016-04-27_12:00:12.114936
|-- 2016-04-27_18:02:33.014975
|-- 2016-04-28_12:04:45.015015
|-- 2016-04-28_18:00:07.215054
|-- 2016-04-29_12:01:18.115094
-- 2016-04-29_18:00:00.415149Which is quite more readable than
- releases
|-- 20160425120500
|-- 20160425180102
|-- 20160426120003
|-- 20160426180300
|-- 20160427120012
|-- 20160427180233
|-- 20160428120445
|-- 20160428180007
|-- 20160429120118
-- 20160429180000Don't you think ? [image: 😉]
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/deployphp/recipes/issues/50
Pozdrawiam,
Hubert Kowalski
from recipes.
@johnny-bit Well then you have nice superpowers! 😉
Not having an exceptionaly accute sight, I find that this:
+ releases
|-- 20160425120500
|-- 20160425180102
|-- 20160426120003
|-- 20160426180300
|-- 20160427120012
|-- 20160427180233
|-- 20160428120445
|-- 20160428180007
|-- 20160429120118
\-- 20160429180000
Is a lot harder to scan than this:
+ releases
|-- 2016-04-25_12:05:00.011813
|-- 2016-04-25_18:01:02.614783
|-- 2016-04-26_12:00:03.314854
|-- 2016-04-26_18:03:00.214896
|-- 2016-04-27_12:00:12.114936
|-- 2016-04-27_18:02:33.014975
|-- 2016-04-28_12:04:45.015015
|-- 2016-04-28_18:00:07.215054
|-- 2016-04-29_12:01:18.115094
\-- 2016-04-29_18:00:00.415149
I can tell much quicker what's the month, day, hour of a release, without having to think about it.
characters like ":" and "." may be problematic
:
might be on windows maybe, but then everything is going to be problematic, since recipes expect a POSIX shell... but anyway, it could easily be replaced by a -
.
.
is never going to be problematic, and is very common for directories (e.g. /etc/php5/conf.d
, /etc/apache2/conf.d
, /etc/apt/sources.list.d
, just to name a few)
from recipes.
Related Issues (20)
- Email recipe HOT 4
- [Error] Call to undefined method Symfony\Component\Console\Helper\QuestionHelper::getInputStream() HOT 5
- What about merging recipes and deployer? HOT 7
- Issue with recipe/sentry HOT 3
- [slack] No branch or commit name HOT 2
- add npm build to npm recipe
- Rsync filterperdir wrong variable HOT 2
- RocketChat Integration HOT 2
- Sentry recipe fails when there's no .git directory HOT 2
- MS Teams notification integration HOT 1
- Website recipes documentation is not aligned with repository docs
- Problems configuring cachetool
- Sentry Release/Deploy fails due to server response HOT 4
- Segmentation Fault / Slack Recipe / PHP 7.3
- Problem resolving CacheTool binary
- Catch-22: Deployer installs composer dependencies, but deployer/recipes is a dependency HOT 3
- Zulip recipe HOT 1
- releaseIsGitDirectory() needs to return 0 if it's not a git repo
- Rollbar notify do not work with --hosts option
- New cachetool release (5.X) breaks cachetool recipe expectations for PHP 7.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recipes.