Skip to content

Commit

Permalink
fix(copier-template): rename .copier-config.yaml to .copier-docker-co…
Browse files Browse the repository at this point in the history
…nfig
  • Loading branch information
entelecheia committed Aug 22, 2023
1 parent b01bd49 commit 555a384
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .copier-template/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,25 @@ initialize: install-pipx ## initialize the project environment
@pre-commit install

init-project: initialize ## initialize the project (Warning: do this only once!)
@copier copy --trust --answers-file .copier-config.yaml gh:entelecheia/hyperfast-docker-template .
@copier copy --trust --answers-file .copier-docker-config gh:entelecheia/hyperfast-docker-template .

{% if project_name == 'hyperfast-python-template' -%}
reinit-project: install-copier ## reinitialize the project (Warning: this may overwrite existing files!)
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-config.yaml --trust --vcs-ref=HEAD . .'
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-docker-config --trust --vcs-ref=HEAD . .'

reinit-project-force: install-copier ## initialize the project ignoring existing files (Warning: this will overwrite existing files!)
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-config.yaml --trust --force --vcs-ref=HEAD . .'
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-docker-config --trust --force --vcs-ref=HEAD . .'

test-init-project: install-copier ## test initializing the project to a temporary directory
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-config.yaml --trust --vcs-ref=HEAD . tests/copier'
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-docker-config --trust --vcs-ref=HEAD . tests/copier'
@rm -rf tmp/.git

test-init-project-force: install-copier ## test initializing the project to a temporary directory forcing overwrite
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-config.yaml --trust --force --vcs-ref=HEAD . tests/copier'
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-docker-config --trust --force --vcs-ref=HEAD . tests/copier'
@rm -rf tmp/.git
{% else -%}
reinit-project: install-copier ## reinitialize the project (Warning: this may overwrite existing files!)
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-config.yaml --trust {%- if project_name.endswith('-template') %} --vcs-ref=HEAD{% endif %} gh:entelecheia/hyperfast-docker-template .'
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-docker-config --trust {%- if project_name.endswith('-template') %} --vcs-ref=HEAD{% endif %} gh:entelecheia/hyperfast-docker-template .'
{% endif -%}

##@ Docker
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ initialize: install-pipx ## initialize the project environment
@pre-commit install

init-project: initialize ## initialize the project (Warning: do this only once!)
@copier copy --trust --answers-file .copier-config.yaml gh:entelecheia/hyperfast-docker-template .
@copier copy --trust --answers-file .copier-docker-config.yaml gh:entelecheia/hyperfast-docker-template .

reinit-project: install-copier ## reinitialize the project (Warning: this may overwrite existing files!)
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-config.yaml --trust --vcs-ref=HEAD gh:entelecheia/hyperfast-docker-template .'
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier copy "$${args[@]}" --answers-file .copier-docker-config.yaml --trust --vcs-ref=HEAD gh:entelecheia/hyperfast-docker-template .'
##@ Docker

docker-login: ## login to docker
Expand Down

0 comments on commit 555a384

Please sign in to comment.