mirror of
https://github.com/Crocmagnon/cookiecutter-django.git
synced 2024-11-21 22:28:02 +01:00
Switch to rtx instead of pyenv
This commit is contained in:
parent
10df25051c
commit
31906c2795
8 changed files with 14 additions and 15 deletions
|
@ -7,7 +7,7 @@ COMMANDS_TO_RUN = [
|
||||||
"pre-commit install",
|
"pre-commit install",
|
||||||
"pre-commit autoupdate",
|
"pre-commit autoupdate",
|
||||||
"pre-commit run --all-files",
|
"pre-commit run --all-files",
|
||||||
"git add ./*.txt",
|
"git add .",
|
||||||
"git commit -m 'Freeze dependencies'",
|
"git commit -m 'Freeze dependencies'",
|
||||||
"pycharm .",
|
"pycharm .",
|
||||||
"inv test",
|
"inv test",
|
||||||
|
@ -21,8 +21,6 @@ def main():
|
||||||
os.system("git init")
|
os.system("git init")
|
||||||
os.system("git add .")
|
os.system("git add .")
|
||||||
os.system("git commit -m 'Initial commit'")
|
os.system("git commit -m 'Initial commit'")
|
||||||
os.system("pyenv virtualenv {{cookiecutter.python_version}} {{cookiecutter.project_slug}}")
|
|
||||||
os.system("pyenv local {{cookiecutter.project_slug}}")
|
|
||||||
print("\nWe created a virtualenv using {{cookiecutter.python_version}} for you.")
|
print("\nWe created a virtualenv using {{cookiecutter.python_version}} for you.")
|
||||||
print("Run the following commands:")
|
print("Run the following commands:")
|
||||||
print("cd {{cookiecutter.project_slug}} && direnv allow")
|
print("cd {{cookiecutter.project_slug}} && direnv allow")
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
layout python3
|
||||||
export ENV_FILE="$(realpath ./envs/local-envs.env)"
|
export ENV_FILE="$(realpath ./envs/local-envs.env)"
|
||||||
export DATABASE_URL="sqlite:///$(realpath ./db/db.sqlite3)"
|
export DATABASE_URL="sqlite:///$(realpath ./db/db.sqlite3)"
|
||||||
|
|
|
@ -30,13 +30,13 @@ jobs:
|
||||||
uses: tibdex/github-app-token@v1
|
uses: tibdex/github-app-token@v1
|
||||||
id: generate-token
|
id: generate-token
|
||||||
with:
|
with:
|
||||||
app_id: ${{ secrets.PR_APP_ID }}
|
app_id: {% raw %}${{ secrets.PR_APP_ID }}{% endraw %}
|
||||||
private_key: ${{ secrets.PR_APP_PRIVATE_KEY }}
|
private_key: {% raw %}${{ secrets.PR_APP_PRIVATE_KEY }}{% endraw %}
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v4
|
uses: peter-evans/create-pull-request@v4
|
||||||
id: create-pull-request
|
id: create-pull-request
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: {% raw %}${{ steps.generate-token.outputs.token }}{% endraw %}
|
||||||
commit-message: Update dependencies
|
commit-message: Update dependencies
|
||||||
base: master
|
base: master
|
||||||
branch: update-dependencies
|
branch: update-dependencies
|
||||||
|
|
2
{{cookiecutter.project_slug}}/.gitignore
vendored
2
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
.direnv/
|
||||||
|
|
||||||
### Django ###
|
### Django ###
|
||||||
*.log
|
*.log
|
||||||
*.pot
|
*.pot
|
||||||
|
|
1
{{cookiecutter.project_slug}}/.tool-versions
Normal file
1
{{cookiecutter.project_slug}}/.tool-versions
Normal file
|
@ -0,0 +1 @@
|
||||||
|
python {{ cookiecutter.python_version }}
|
|
@ -3,8 +3,6 @@
|
||||||
## Quick start
|
## Quick start
|
||||||
Clone, then
|
Clone, then
|
||||||
```shell
|
```shell
|
||||||
pyenv virtualenv {{cookiecutter.python_version}} {{cookiecutter.project_slug}}
|
|
||||||
pyenv local {{cookiecutter.project_slug}}
|
|
||||||
pip install pip-tools
|
pip install pip-tools
|
||||||
pip-sync requirements.txt requirements-dev.txt
|
pip-sync requirements.txt requirements-dev.txt
|
||||||
pre-commit install --install-hooks
|
pre-commit install --install-hooks
|
||||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|
|
@ -238,15 +238,15 @@ APP = {
|
||||||
try:
|
try:
|
||||||
with Path("/app/git/build-date").open() as f:
|
with Path("/app/git/build-date").open() as f:
|
||||||
APP["build"]["date"] = f.read().strip()
|
APP["build"]["date"] = f.read().strip()
|
||||||
except Exception:
|
except Exception: # noqa: S110
|
||||||
pass # noqa: S110
|
pass
|
||||||
try:
|
try:
|
||||||
with Path("/app/git/git-commit").open() as f:
|
with Path("/app/git/git-commit").open() as f:
|
||||||
APP["build"]["commit"] = f.read().strip()
|
APP["build"]["commit"] = f.read().strip()
|
||||||
except Exception:
|
except Exception: # noqa: S110
|
||||||
pass # noqa: S110
|
pass
|
||||||
try:
|
try:
|
||||||
with Path("/app/git/git-describe").open() as f:
|
with Path("/app/git/git-describe").open() as f:
|
||||||
APP["build"]["describe"] = f.read().strip()
|
APP["build"]["describe"] = f.read().strip()
|
||||||
except Exception:
|
except Exception: # noqa: S110
|
||||||
pass # noqa: S110
|
pass
|
||||||
|
|
Loading…
Reference in a new issue