Skip to content

Commit

Permalink
Refactor submodule handling in justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobi-De committed Sep 10, 2024
1 parent b7f21b1 commit 7e563a4
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ submodule-init:
# Checkout all submodules on main
checkout:
#!/usr/bin/env sh
for parent_dir in blueprints packages; do
for parent_dir in blueprints; do
for dir in $parent_dir/*; do
if [ -d "$dir" ]; then
echo "$(basename $dir)"
Expand All @@ -98,7 +98,7 @@ checkout:
pull:
#!/usr/bin/env sh
git pull
for parent_dir in blueprints packages; do
for parent_dir in blueprints; do
for dir in $parent_dir/*; do
if [ -d "$dir" ]; then
echo "$(basename $dir)"
Expand All @@ -113,7 +113,7 @@ pull:
fetch:
#!/usr/bin/env sh
git fetch --all
for parent_dir in blueprints packages; do
for parent_dir in blueprints; do
for dir in $parent_dir/*; do
if [ -d "$dir" ]; then
echo "$(basename $dir)"
Expand All @@ -138,13 +138,12 @@ merge:
# Push all changes in all submodules
push:
#!/usr/bin/env sh
for parent_dir in blueprints packages; do
for dir in $parent_dir/*; do
if [ -d "$dir" ]; then
echo "$(basename $dir)"
cd "$dir"
git pull
git push
cd -
fi
for dir in blueprints/*; do
if [ -d "$dir" ]; then
echo "$(basename $dir)"
cd "$dir"
git pull
git push
cd -
fi
done

0 comments on commit 7e563a4

Please sign in to comment.