Refactor setup workflow
This commit is contained in:
22
Commands/Bin/mod.just
Normal file
22
Commands/Bin/mod.just
Normal file
@@ -0,0 +1,22 @@
|
||||
project_root := justfile_directory()
|
||||
bin_script_dir := project_root + "/Scripts/bin"
|
||||
|
||||
# Install all pinned repo-managed binaries into ~/.local/bin.
|
||||
install-all:
|
||||
bash '{{bin_script_dir}}/install.sh' --all
|
||||
|
||||
# Install one pinned repo-managed binary into ~/.local/bin.
|
||||
install tool:
|
||||
bash '{{bin_script_dir}}/install.sh' '{{tool}}'
|
||||
|
||||
# Update the pinned version for a binary. If no version is given, open an fzf selector when available.
|
||||
update tool version='':
|
||||
bash '{{bin_script_dir}}/update.sh' '{{tool}}' '{{version}}'
|
||||
|
||||
# List available releases for a supported binary.
|
||||
list tool:
|
||||
bash '{{bin_script_dir}}/update.sh' --list '{{tool}}'
|
||||
|
||||
# Print the currently pinned versions.
|
||||
show:
|
||||
cat '{{project_root}}/Bins/versions.json'
|
||||
20
Commands/Lang/mod.just
Normal file
20
Commands/Lang/mod.just
Normal file
@@ -0,0 +1,20 @@
|
||||
project_root := justfile_directory()
|
||||
scripts_dir := project_root + "/Scripts"
|
||||
|
||||
node:
|
||||
bash '{{scripts_dir}}/node.sh'
|
||||
|
||||
go:
|
||||
bash '{{scripts_dir}}/go.sh'
|
||||
|
||||
rust:
|
||||
bash '{{scripts_dir}}/rust.sh'
|
||||
|
||||
python:
|
||||
bash '{{scripts_dir}}/python.sh'
|
||||
|
||||
r:
|
||||
bash '{{scripts_dir}}/r.sh'
|
||||
|
||||
cpp:
|
||||
bash '{{scripts_dir}}/cpp.sh'
|
||||
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