Skip to content
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

create initial shared file #1143

Merged
merged 5 commits into from
Apr 6, 2017
Merged

create initial shared file #1143

merged 5 commits into from
Apr 6, 2017

Conversation

vinpel
Copy link
Contributor

@vinpel vinpel commented Apr 4, 2017

Q A
Bug fix? Yes
New feature? Yes
BC breaks? No
Deprecations? No
Fixed tickets N/A

Yii2 advanced app receipe :

The shared step create empty config in shared & link.
After that the "init" phase create the config file in their place.

I've inversed the order to be able for the 1st deployment a valid config file without manual edition.

Shared /deploy/shared.php

When a shared_file is not present in shared, but present in release we use it as reference.

An exemple for yii2 receipe :

-> Init phase create for exemple "/common/config/main-local.php"
-> Shared phase now copy this file in the shared dir, remove it from release and create the link.
The file is now non empty in shared and the yii2 app is functional

If the file exist in shared, no copy and same as usal.

Do not forget to add notes about your changes to CHANGELOG.md

if (!test("[ -f $sharedPath/$file ]") && test("[ -f {{release_path}}/$file ]")) {
// Copy file in shared dir if not present
run("cp -rv {{release_path}}/$file $sharedPath/$file");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix

@antonmedv
Copy link
Member

And please add to changelog.

@stevenklar stevenklar mentioned this pull request Apr 5, 2017
@antonmedv antonmedv merged commit c3a5c24 into deployphp:master Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants