-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
9 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to test the cookiecutter template | ||
# It will create a new project using the cookiecutter template under the generated/ directory | ||
# It will create a new project using the cookiecutter template under the generated/$1-$2-$3/ directory | ||
# The script accepts two positional arguments: app-type and python-version | ||
# The cookiecutter replay file is used to provide the default values for the cookiecutter template | ||
|
||
# Accept two arguments: app-type and python-version | ||
echo -e "\033[32mGenerating project using cookiecutter template with app-type: $1 and python-version: $2\033[0m" | ||
cookiecutter -f --replay-file ./cookiecutter_replay/$1_$2.json --output-dir generated/ ./ | ||
echo -e "\033[32mGenerating project using cookiecutter template with app-type: $1, python-version: $2 and authentication: $3\033[0m" | ||
rm -rf generated/$1-$2-$3 | ||
cookiecutter -f --no-input --output-dir generated/$1-$2-$3/ ./ app_type=$1 python_version=$2 authentication=$3 | ||
|
||
# Install generated project's dependencies | ||
echo -e "\033[32mInstalling dependencies for the generated project\033[0m" | ||
cd generated/my_fastagency_app && pip install -e .[dev] && cd ../../ | ||
cd generated/$1-$2-$3/my_fastagency_app && pip install -e .[dev] && cd ../../.. | ||
|
||
# Initialize git in the generated project(needed for pre-commit) | ||
echo -e "\033[32mInitializing git in the generated project\033[0m" | ||
cd generated/my_fastagency_app && git init && git add . && cd ../../ | ||
cd generated/$1-$2-$3/my_fastagency_app && git init && git add . && cd ../../.. | ||
|
||
# Run pre-commit | ||
echo -e "\033[32mRunning pre-commit\033[0m" | ||
cd generated/my_fastagency_app && pre-commit run --show-diff-on-failure --color=always --all-files && cd ../../ | ||
cd generated/$1-$2-$3/my_fastagency_app && pre-commit run --show-diff-on-failure --color=always --all-files && cd ../../.. |