Skip to content

Commit

Permalink
chore: add justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobi-De committed May 27, 2024
1 parent e5ffcfe commit a445ccf
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.{html,css,scss,json,yml,xml}]
[*.{html,css,scss,json,yml,xml,toml}]
indent_style = space
indent_size = 2

Expand Down
2 changes: 1 addition & 1 deletion blueprints/falco_blueprint_basic
2 changes: 1 addition & 1 deletion blueprints/falco_blueprint_basic_bootstrap
1 change: 1 addition & 0 deletions blueprints/falco_twind
Submodule falco_twind added at 2f8a63
61 changes: 61 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
default := "blueprints/falco_blueprint_basic"

# List all available commands
_default:
@just --list

just default:
cd {{ default }}

# Run git pull in every blueprints
pull:
#!/usr/bin/env sh
for dir in blueprints/*; do
if [ -d "$dir" ]; then
cd "$dir"
git fetch --all
git pull
cd -
fi
done
# Set the upstream remote
set-remote:
#!/usr/bin/env sh
for dir in blueprints/*; do
if [ -d "$dir" ]; then
if [ "$dir" = "{{ default }}" ]; then
continue
fi
cd "$dir"
git remote add upstream "git@github.com:Tobi-De/falco_blueprint_basic.git"
cd -
fi
done

merge:
#!/usr/bin/env sh
for dir in blueprints/*; do
if [ -d "$dir" ]; then
if [ "$dir" = "{{ default }}" ]; then
continue
fi
cd "$dir"
git merge upstream/main
cd -
fi
done

push:
#!/usr/bin/env sh
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 a445ccf

Please sign in to comment.