-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract the sync command to its own file
- Loading branch information
Showing
2 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,5 @@ | ||
guard :shell do | ||
watch %r{^templates/(.*)$} do | ||
# We don't run rsync with --delete because this would delete files in the | ||
# sandbox that are not in the templates. These would be files installed by | ||
# `rails new` and by `solidus:install` prior to installing the frontend | ||
# files from the templates. | ||
rspec_command = %Q{ | ||
rsync \ | ||
--archive \ | ||
--verbose \ | ||
templates/ \ | ||
sandbox | ||
} | ||
|
||
system(rspec_command) | ||
system("#{__dir__}/bin/sync") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# We don't run rsync with --delete because this would delete files in the | ||
# sandbox that are not in the templates. These would be files installed by | ||
# `rails new` and by `solidus:install` prior to installing the frontend | ||
# files from the templates. | ||
rsync \ | ||
--archive \ | ||
--verbose \ | ||
templates/ \ | ||
sandbox | ||
|