Skip to content

Commit

Permalink
Extract shell function to update Azul clone
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes-ucsc committed Sep 4, 2024
1 parent eeefafc commit c1d8633
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions environment
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,7 @@ _clone() {
git worktree add "../azul.${deployment}" "${branch}"
cd "../azul.${deployment}"
(cd terraform/gitlab/vpn && git submodule update --init easy-rsa)
rsync -rvlm \
-f '+ */' \
-f '+ environment.local.py' \
-f '+ /deployments/*.local/environment*.py' \
-f '- *' \
../azul/ \
.
_update_clone
source environment
_link "${deployment}"
_refresh
Expand Down Expand Up @@ -316,6 +310,16 @@ _clone() {
)
}

_update_clone() {
rsync -rvlm \
-f '+ */' \
-f '+ environment.local.py' \
-f '+ /deployments/*.local/environment*.py' \
-f '- *' \
../azul/ \
.
}

# We disable `envhook.py` to avoid redundancy. The `envhook.py` script imports
# `export_environment.py`, too. We could also pass -S to `python3` but that
# causes problems on Travis (`importlib.util` failing to import `contextlib`).
Expand Down

0 comments on commit c1d8633

Please sign in to comment.