Skip to content

Commit

Permalink
justfile: rename cleanpython to lowercase project name
Browse files Browse the repository at this point in the history
in pyproject.toml
in addition fix the other renames in py files (they need to be lowercase)
Fix #63
  • Loading branch information
iacopy committed Dec 4, 2023
1 parent cce59a7 commit a749a1e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ MIN_COVERAGE := '100'
# rename project and author
@rename project author:
mv src/cleanpython src/{{project}}
lowercase_project=$$(echo "{{project}}" | tr '[:upper:]' '[:lower:]')
# replace string "Cleanpython" with {{project}} and "iacopy" with {{author}} in files
sed -i "" -e s/cleanpython/"{{project}}"/g tests/test_app.py
sed -i "" -e s/cleanpython/"{{project}}"/g tests/test_foobar.py
sed -i "" -e s/Cleanpython/"{{project}}"/g -e s/iacopy/"{{author}}"/g pyproject.toml
sed -i "" -e s/cleanpython/$$lowercase_project/g tests/test_app.py
sed -i "" -e s/cleanpython/$$lowercase_project/g tests/test_foobar.py
sed -i "" -e s/Cleanpython/"{{project}}"/g -e s/iacopy/"{{author}}"/g -e s/cleanpython/$$lowercase_project/g pyproject.toml

sed -i "" s/"Clean code with batteries included."/"Project description placeholder"/g pyproject.toml
sed -i "" s/iacopy/"{{author}}"/g LICENSE

Expand Down

0 comments on commit a749a1e

Please sign in to comment.