Skip to content

Commit

Permalink
ci(make): preserve timestamps
Browse files Browse the repository at this point in the history
to avoid re-triggering a snapshot unnecessarily

also build snapshot .venv when it doesn't exist
  • Loading branch information
tekumara committed Mar 11, 2024
1 parent f67b1f7 commit dd3af41
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ $(snapshot): $(shell find {{cookiecutter.repo_name}}) cookiecutter* | $(cookiecu
$(cookiecutter) -o $(snapshot)/../ -f --no-input --config-file cookiecutter-config.yaml .
touch $(snapshot)

$(snapshot)/.venv: $(snapshot)
cd $(snapshot) && make install

## list outdated packages
outdated: $(snapshot)
outdated: $(snapshot)/.venv
$(snapshot)/.venv/bin/pip list --outdated
cd $(snapshot) && npm outdated

## update pre-commit hooks
pc-update: $(snapshot)
pc-update: $(snapshot)/.venv
cd $(snapshot) && .venv/bin/pre-commit autoupdate
cp $(snapshot)/.pre-commit-config.yaml {{cookiecutter.repo_name}}/
cp -p $(snapshot)/.pre-commit-config.yaml {{cookiecutter.repo_name}}/

0 comments on commit dd3af41

Please sign in to comment.