Skip to content

Commit

Permalink
Extract the sync command to its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Nov 21, 2022
1 parent dec9862 commit 2eb4bc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 1 addition & 13 deletions Guardfile
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
12 changes: 12 additions & 0 deletions bin/sync
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

0 comments on commit 2eb4bc4

Please sign in to comment.