Refactor setup workflow
This commit is contained in:
43
Commands/Setup/mod.just
Normal file
43
Commands/Setup/mod.just
Normal file
@@ -0,0 +1,43 @@
|
||||
project_root := justfile_directory()
|
||||
scripts_dir := project_root + "/Scripts"
|
||||
|
||||
# Run the full setup flow.
|
||||
all:
|
||||
bash '{{scripts_dir}}/setup.sh'
|
||||
|
||||
# Install the base system layer only.
|
||||
base:
|
||||
bash '{{scripts_dir}}/base.sh'
|
||||
|
||||
# Stow shell files into $HOME.
|
||||
stow:
|
||||
stow --dir='{{project_root}}' Zsh --target="$HOME"
|
||||
|
||||
# Remove stowed shell files from $HOME.
|
||||
clean:
|
||||
stow --dir='{{project_root}}' -D Zsh --target="$HOME"
|
||||
|
||||
# Pull latest changes and rerun setup.
|
||||
update:
|
||||
git -C '{{project_root}}' pull origin main
|
||||
just --justfile '{{project_root}}/Justfile' setup all
|
||||
|
||||
# Run distro test containers.
|
||||
test-ubuntu:
|
||||
echo "Ubuntu Test"
|
||||
docker run -it --rm -e TERM=xterm-256color -v '{{project_root}}':/root/dotfiles ubuntu:latest \
|
||||
bash -c "export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y sudo git make curl && \
|
||||
cd /root/dotfiles && \
|
||||
make setup"
|
||||
|
||||
test-arch:
|
||||
echo "Spawning Arch Container..."
|
||||
docker run -it --rm -e TERM=xterm-256color -v '{{project_root}}':/root/dotfiles archlinux:latest \
|
||||
bash -c "pacman -Sy --noconfirm base-devel git make sudo && cd /root/dotfiles && make setup"
|
||||
|
||||
test-fedora:
|
||||
echo "Spawning Fedora Container..."
|
||||
docker run -it --rm -e TERM=xterm-256color -v '{{project_root}}':/root/dotfiles fedora:latest \
|
||||
bash -c "dnf install -y git make sudo curl which passwd procps-ng && cd /root/dotfiles && make setup"
|
||||
Reference in New Issue
Block a user