Skip to content

Commit a05b446

Browse files
committed
feat: change implemations
1 parent e257f82 commit a05b446

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎{{cookiecutter.project_name}}/Makefile‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ _poetry-config:
5252
poetry run toml set --toml-path pyproject.toml tool.coverage.report.show_missing TRUE; \
5353
poetry run toml set --toml-path pyproject.toml tool.coverage.report.fail_under COVERAGE; \
5454
poetry run toml set --toml-path pyproject.toml tool.coverage.report.exclude_lines EXCLUDE_LINES; \
55-
sed -i '' 's/"TRUE"/true/g' pyproject.toml; \
56-
sed -i '' 's/"COVERAGE"/100/g' pyproject.toml; \
57-
sed -i '' 's/"SOURCE"/["{{cookiecutter.pkg_name}}"]/g' pyproject.toml; \
58-
sed -i '' 's/"EXCLUDE_LINES"/["if __name__ == .__main__.:"]/g' pyproject.toml; \
59-
sed -i '' 's/"poetry-core"/"poetry-core>=1.1.0"/g' pyproject.toml; \
55+
if [ -e "pyproject.toml" ]; then \
56+
sed 's/"TRUE"/true/g' pyproject.toml > tmpfile && mv tmpfile pyproject.toml; \
57+
sed 's/"COVERAGE"/100/g' pyproject.toml > tmpfile && mv tmpfile pyproject.toml; \
58+
sed 's/"SOURCE"/["ai_git_commit"]/g' pyproject.toml > tmpfile && mv tmpfile pyproject.toml; \
59+
sed 's/"EXCLUDE_LINES"/["if __name__ == .__main__.:"]/g' pyproject.toml > tmpfile && mv tmpfile pyproject.toml; \
60+
sed 's/"poetry-core"/"poetry-core>=1.1.0"/g' pyproject.toml > tmpfile && mv tmpfile pyproject.toml; \
61+
fi \
6062
git add .; \
6163
git commit -m "feat: initial commit"; \
6264
fi

0 commit comments

Comments
 (0)