From fa23fd1a64717edb0ab1579009c0c58977d0ae10 Mon Sep 17 00:00:00 2001 From: Muhammad Rehan Date: Mon, 23 Dec 2024 19:38:50 +0500 Subject: [PATCH] Update scaf to use template from scaf-template repo --- .github/workflows/setup-project.yaml | 2 +- scaf | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/setup-project.yaml b/.github/workflows/setup-project.yaml index 965efb4a..23898cec 100644 --- a/.github/workflows/setup-project.yaml +++ b/.github/workflows/setup-project.yaml @@ -64,5 +64,5 @@ jobs: git config --global user.email "setup-project--create@example.com" git config --global user.name "CI CD Setup Project" - REPO_URL="https://github.com/sixfeetup/scaf.git" + REPO_URL="https://github.com/rehan892/test-scaf-templates/" $HOME/.local/bin/scaf myproject --no-input --checkout $GITHUB_REF_NAME $REPO_URL diff --git a/scaf b/scaf index e45801ee..87f740d4 100755 --- a/scaf +++ b/scaf @@ -14,7 +14,11 @@ fi CHALLENGE_CONFIG_PATH=".scaf-challenge.json" # Default repository URL if none is provided -DEFAULT_REPO_URL="https://github.com/sixfeetup/scaf/" +DEFAULT_REPO_URL="https://github.com/rehan892/test-scaf-templates/" + +# Default template to use if none provided +DEFAULT_DIRECTORY="templates/sixfeetup-fullstack" +DIRECTORY_OPTION="--directory=\"$DEFAULT_DIRECTORY\"" # Ensure at least one argument is provided (for project_slug) if [ $# -lt 1 ]; then @@ -235,6 +239,7 @@ docker run --rm $DOCKER_RUN_OPTIONS -v "$(pwd):/home/scaf/out" \ cookiecutter \ $COOKIECUTTER_OPTIONS \ $REPO_URL \ + $DIRECTORY_OPTION \ project_slug="$COOKIECUTTER_SLUG" \ _challenge="$SCAF_CHALLENGE"