Skip to content

Commit

Permalink
Update pipeline to use default values
Browse files Browse the repository at this point in the history
  • Loading branch information
rehan892 committed Dec 31, 2024
1 parent b12b061 commit 5ceb9a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/setup-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ jobs:
- name: Create Project with Scaf
shell: bash
run: |
IMAGE_TAG=$GITHUB_SHA
echo "Running scaf with sixfeetup/scaf:$IMAGE_TAG"
git config --global init.defaultBranch dev
git config --global user.email "[email protected]"
git config --global user.name "CI CD Setup Project"
REPO_URL="https://github.com/sixfeetup/scaf-templates.git"
$HOME/.local/bin/scaf myproject --defaults $REPO_URL
$HOME/.local/bin/scaf myproject --use-default $REPO_URL
11 changes: 5 additions & 6 deletions scaf
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ else
COOKIECUTTER_OPTIONS=""
fi

DOCKER_RUN_OPTIONS=""

# Check if --no-input is in COOKIECUTTER_OPTIONS
if [[ "$COOKIECUTTER_OPTIONS" != *"--no-input"* ]]; then
DOCKER_RUN_OPTIONS="-it"
COPIER_RUN_OPTIONS="--defaults"
# Check if --use-default is present in scaf cli arguments
if [[ "$COOKIECUTTER_OPTIONS" != *"--use-default"* ]]; then
COPIER_RUN_OPTIONS=""
fi

# Check if --challenge is in scaf cli arguments
Expand Down Expand Up @@ -235,7 +234,7 @@ if [[ "$PYTHON_VERSION" != 3.8 && "$PYTHON_VERSION" != 3.9 && "$PYTHON_VERSION"
fi

echo "Creating your project..."
uv run --with isort,black,copier copier copy --vcs-ref 443-update-template $REPO_URL . --trust -d "is_challange_mode=$IS_CHALLENGE_MODE" -d "is_project_slug=$COOKIECUTTER_SLUG"
uv run --with isort,black,copier copier copy --vcs-ref 443-update-template $COPIER_RUN_OPTIONS $REPO_URL . --trust -d "is_challange_mode=$IS_CHALLENGE_MODE" -d "is_project_slug=$COOKIECUTTER_SLUG"


# Check if cookiecutter was successful
Expand Down

0 comments on commit 5ceb9a1

Please sign in to comment.