From 600dbea955e67ea73fc92b14e489225f334a096d Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Fri, 21 Nov 2025 09:04:35 +0100 Subject: [PATCH] feat(task): add clone-taskfile command and update dev-11ty to open browser - Introduce `clone-taskfile` function to manage taskfile repository cloning and pulling - Modify `dev-11ty` command to automatically open the browser at `http://localhost:8080/` - Reorder static variable declarations for better script organization - Improve output formatting with colored Git status messages --- README.md | 2 +- task | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7c35352..fa076a4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ permalink: /

Run any project.

-![Vercel](https://vercelbadge.vercel.app/api/janikvonrotz/taskfile.build) +[![.forgejo/workflows/build.yml](https://codeberg.org/janikvonrotz/taskfile.build/badges/workflows/build.yml/badge.svg)](https://codeberg.org/janikvonrotz/taskfile.build/actions?workflow=build.yml) ![Vercel](https://vercelbadge.vercel.app/api/janikvonrotz/taskfile.build) --- diff --git a/task b/task index bf98f0a..057f692 100755 --- a/task +++ b/task @@ -37,14 +37,15 @@ help() { echo } -# Static vars - -BUILDX_PLATFORM="linux/amd64" -CONTAINER_REGISTRY="janikvonrotz" -CONTAINER_TAG="taskfile.build:latest" -DOCKERFILE="image/Dockerfile" - -# Import commands +clone-taskfile(){ + if [[ ! -d "$HOME/taskfile.build" ]]; then + echo -e '\033[38;5;214mGit\033[0m: Clone taskfile repo' + git clone https://git.taskfile.build "$HOME/taskfile.build" + else + echo -e '\033[38;5;214mGit\033[0m: Pull taskfile repo' + git -C "$HOME/taskfile.build" pull + fi +} if [[ -d "$HOME/taskfile.build/bin" ]]; then for file in "$HOME/taskfile.build/bin/"*; do @@ -54,6 +55,13 @@ if [[ -d "$HOME/taskfile.build/bin" ]]; then done fi +# Static vars + +BUILDX_PLATFORM="linux/amd64" +CONTAINER_REGISTRY="janikvonrotz" +CONTAINER_TAG="taskfile.build:latest" +DOCKERFILE="image/Dockerfile" + # Project commands run() { @@ -70,7 +78,7 @@ install() { } dev-11ty() { - pnpm dlx @11ty/eleventy --serve + open-with-os 'http://localhost:8080/' & pnpm dlx @11ty/eleventy --serve } lint() {