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

Update to support adding new files to distignore #26

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

pascalknecht
Copy link
Contributor

Description of the Change

Fixed excluded files not being deleted if newly added to .distignore or .gitattributes. Currently if I had commited any file by accident and added this file newly to .distignore it will not be deleted as the rsync does not delete them

Benefits

Allows developers to be sure all files are deleted when necessary.

Possible Drawbacks

I think there are none.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Fixed excluded files not being deleted if newly added to .distignore or .gitattributes
@jeffpaul jeffpaul added the type:enhancement New feature or request. label Feb 4, 2020
@jeffpaul
Copy link
Member

jeffpaul commented Feb 4, 2020

@pascalknecht welcome to our GitHub Actions and thanks for the PR! We'll work to get this into and through review and respond with any questions or concerns then, otherwise this will get milestoned into an upcoming release. Thanks again!

@@ -54,7 +54,7 @@ if [[ -e "$GITHUB_WORKSPACE/.distignore" ]]; then
echo "ℹ︎ Using .distignore"
# Copy from current branch to /trunk, excluding dotorg assets
# The --delete flag will delete anything in destination that no longer exists in source
rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete
rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded
Copy link
Collaborator

@helen helen Mar 4, 2020

Choose a reason for hiding this comment

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

I think --delete-excluded also encompasses --delete but I like that keeping both is clear that both things are going to happen.

@helen helen added this to the 1.5.0 milestone Mar 4, 2020
@helen helen merged commit 517452a into 10up:develop Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants