Skip to content

Commit c1d8633

Browse files
committed
Extract shell function to update Azul clone
1 parent eeefafc commit c1d8633

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

environment

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,7 @@ _clone() {
279279
git worktree add "../azul.${deployment}" "${branch}"
280280
cd "../azul.${deployment}"
281281
(cd terraform/gitlab/vpn && git submodule update --init easy-rsa)
282-
rsync -rvlm \
283-
-f '+ */' \
284-
-f '+ environment.local.py' \
285-
-f '+ /deployments/*.local/environment*.py' \
286-
-f '- *' \
287-
../azul/ \
288-
.
282+
_update_clone
289283
source environment
290284
_link "${deployment}"
291285
_refresh
@@ -316,6 +310,16 @@ _clone() {
316310
)
317311
}
318312

313+
_update_clone() {
314+
rsync -rvlm \
315+
-f '+ */' \
316+
-f '+ environment.local.py' \
317+
-f '+ /deployments/*.local/environment*.py' \
318+
-f '- *' \
319+
../azul/ \
320+
.
321+
}
322+
319323
# We disable `envhook.py` to avoid redundancy. The `envhook.py` script imports
320324
# `export_environment.py`, too. We could also pass -S to `python3` but that
321325
# causes problems on Travis (`importlib.util` failing to import `contextlib`).

0 commit comments

Comments
 (0)