mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-14 00:44:53 +03:00
Move bash_history into .devcontainer folder
This commit is contained in:
parent
6c1be80ad4
commit
45ee32e607
|
@ -73,16 +73,6 @@ def remove_pycharm_files():
|
||||||
shutil.rmtree(docs_dir_path)
|
shutil.rmtree(docs_dir_path)
|
||||||
|
|
||||||
|
|
||||||
def create_devcontainer_bash_history_file():
|
|
||||||
history_dir_path = ".history"
|
|
||||||
if not os.path.exists(history_dir_path):
|
|
||||||
os.mkdir(history_dir_path)
|
|
||||||
|
|
||||||
history_file_path = ".history/bash_history"
|
|
||||||
with open(history_file_path, "a"):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def remove_docker_files():
|
def remove_docker_files():
|
||||||
shutil.rmtree(".devcontainer")
|
shutil.rmtree(".devcontainer")
|
||||||
shutil.rmtree("compose")
|
shutil.rmtree("compose")
|
||||||
|
@ -443,7 +433,6 @@ def main():
|
||||||
|
|
||||||
if "{{ cookiecutter.use_docker }}".lower() == "y":
|
if "{{ cookiecutter.use_docker }}".lower() == "y":
|
||||||
remove_utility_files()
|
remove_utility_files()
|
||||||
create_devcontainer_bash_history_file()
|
|
||||||
else:
|
else:
|
||||||
remove_docker_files()
|
remove_docker_files()
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"init": true,
|
"init": true,
|
||||||
"mounts": [
|
"mounts": [
|
||||||
{
|
{
|
||||||
"source": "./.history/bash_history",
|
"source": "./.devcontainer/bash_history",
|
||||||
"target": "/home/dev-user/.bash_history",
|
"target": "/home/dev-user/.bash_history",
|
||||||
"type": "bind"
|
"type": "bind"
|
||||||
},
|
},
|
||||||
|
|
5
{{cookiecutter.project_slug}}/.gitignore
vendored
5
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -161,9 +161,8 @@ typings/
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
|
||||||
# Local History for Visual Studio Code
|
# Local History for devcontainer
|
||||||
.history/
|
.devcontainer/bash_history
|
||||||
|
|
||||||
|
|
||||||
{% if cookiecutter.editor == 'PyCharm' -%}
|
{% if cookiecutter.editor == 'PyCharm' -%}
|
||||||
# Provided default Pycharm Run/Debug Configurations should be tracked by git
|
# Provided default Pycharm Run/Debug Configurations should be tracked by git
|
||||||
|
|
Loading…
Reference in New Issue
Block a user