Skip to content

Copy shared files from release - #2267

Closed
aryanjaya wants to merge 1 commit into
deployphp:masterfrom
aryanjaya:bugfix/issue-2069
Closed

aryanjaya wants to merge 1 commit into
deployphp:masterfrom
aryanjaya:bugfix/issue-2069

Conversation

@aryanjaya

@aryanjaya aryanjaya commented Nov 3, 2020 •

Copy link
Copy Markdown

fix deployer cannot sync newer files or directories in shared directory

fix deployer cannot sync newer files or directories in shared directory
@aryanjaya

Copy link
Copy Markdown
Author

Hi,

I want to try add some testing for this change and I already read some test files
but I still don't know where to start
any advice or reference where I can find an example?

Thanks

@antonmedv

Copy link
Copy Markdown
Member

Sure, you can take a look at these test cases and do something similar:
https://github.com/deployphp/deployer/tree/master/test/joy

@antonmedv antonmedv changed the title fixed issue #2069 Copy files on deployshared Nov 4, 2020
@antonmedv antonmedv changed the title Copy files on deployshared Copy shared files from release Nov 4, 2020
Comment thread recipe/deploy/shared.php

// If release contains shared dir, copy that dir from release to shared.
if (test("[ -d $(echo {{release_path}}/$dir) ]")) {
run("cp -ru{$copyVerbosity} {{release_path}}/{$dir} {$sharedPath}/" . dirname(parse($dir)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a really crucial part and needs to be tested.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sure, I still make the test.

Is there anything specific that I need to pay attention to in making the test?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think new test should cover use case of shared copy. Look at joy tests.

@antonmedv

Copy link
Copy Markdown
Member

@aryanjaya any update on this?

@aryanjaya

Copy link
Copy Markdown
Author

@antonmedv Sorry for not updating this pull request yet. I still don't know how to make a test case for this issue.

@antonmedv

Copy link
Copy Markdown
Member

@antonmedv

Copy link
Copy Markdown
Member

Looking for someone who can take and improve this PR with tests? Any new contributors?

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.

Confusion about shared_dirs and Laravel storage folder

3 participants