Skip to content

Commit

Permalink
🐞 fix(ci): Properly sync dot files (wpengine#764)
Browse files Browse the repository at this point in the history
The Atlas template sync workflow had a bug where it would not
properly sync dot files with the `mv` command. This PR fixes
that by using `rsync` instead.
  • Loading branch information
blakewilson authored Feb 7, 2022
1 parent 1d386de commit 29bfe55
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/sync-example-to-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ jobs:
cd ../
mkdir source
# Move all files in SYNC_DIR to the "source" dir
# Rsync all files in SYNC_DIR to the "source" dir
# Using -a, the archive flag, to preserve ownership and permissions
# Using --no-compress as the sync is between local devices
cd $CHECKOUT_DIR_NAME
mv $SYNC_DIR/* ../source/
rsync -a --no-compress $SYNC_DIR/ ../source/
cd ../
# Clone the target repo, and move it's .git dir to the "source" dir
# Clone the target repo, and rsync it's .git dir to the "source" dir
git clone [email protected]:$TARGET_REPO.git target
cd target
mv .git ../source
rsync -a --no-compress .git ../source
cd ../
cd source
Expand Down

0 comments on commit 29bfe55

Please sign in to comment.