diff --git a/ci/test.sh b/ci/test.sh index aa6973d..232c643 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -9,6 +9,11 @@ PROJECT_NAME="sample-project" # Run copier. for TARGET in Snowflake BigQuery; do DIRECTORY=${PROJECT_NAME}-${TARGET} + + # Enter the new project + mkdir -p $DIRECTORY + pushd $DIRECTORY + copier copy \ --data project_name=$DIRECTORY \ --data friendly_project_name="$FRIENDLY_PROJECT_NAME" \ @@ -17,10 +22,7 @@ for TARGET in Snowflake BigQuery; do --data license=MIT \ --data dbt_target=$TARGET \ --data dbt_profile_name="default" \ - caldata-infrastructure-template/ . - - # Enter the new project - pushd $DIRECTORY + ../caldata-infrastructure-template/ . # Initialize git git init diff --git a/copier.yml b/copier.yml index 6d25148..5c3ece3 100644 --- a/copier.yml +++ b/copier.yml @@ -1,6 +1,7 @@ _envops: lstrip_blocks: true trim_blocks: true +_subdirectory: "{% raw %}{{project_name}}{% endraw %}" _exclude: - "copier.yaml" - "copier.yml" @@ -10,10 +11,6 @@ _exclude: - ".git" - ".DS_Store" - ".svn" - - "/ci" - - "/.github" - - "/LICENSE" - - "/README.md" # Questions friendly_project_name: