From 73b980710252ea7231caab83f56755747a39ad03 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 2 Dec 2019 16:23:02 +0000 Subject: [PATCH 1/5] Replace .cfignore symlink with .gitignore Instead of having `.cfignore` as a symlink to `.gitignore`, have them as separate files, with the same content. --- .cfignore | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) mode change 120000 => 100644 .cfignore diff --git a/.cfignore b/.cfignore deleted file mode 120000 index 3e4e48b0b..000000000 --- a/.cfignore +++ /dev/null @@ -1 +0,0 @@ -.gitignore \ No newline at end of file diff --git a/.cfignore b/.cfignore new file mode 100644 index 000000000..2e35c0227 --- /dev/null +++ b/.cfignore @@ -0,0 +1,78 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg +venv/ + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +.pytest_cache +coverage.xml +test_results.xml +*,cover + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ +.idea/ +.DS_Store +.vscode + +# Frontend dependencies and compiled assets +app/assets/stylesheets/govuk_template/.sass-cache/ +.sass-cache/ +cache/ +node_modules +bower_components +npm-debug.log +app/templates/vendor + +environment.sh +.envrc + +# CloudFoundry +.cf +package-lock.json From 3e1af6078f58fba3340dba4cbcf2d7a76b69aabe Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 2 Dec 2019 16:24:56 +0000 Subject: [PATCH 2/5] Remove app/templates/vendor from .cfignore It's created by `npm run build` so needs to be part of the code zipped up by `make build-paas-artifact`. --- .cfignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.cfignore b/.cfignore index 2e35c0227..36ac372c9 100644 --- a/.cfignore +++ b/.cfignore @@ -68,7 +68,6 @@ cache/ node_modules bower_components npm-debug.log -app/templates/vendor environment.sh .envrc From 200a9d479a49b0e018e10b3cf8d056caf9661c87 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 2 Dec 2019 16:26:49 +0000 Subject: [PATCH 3/5] Add .pytest_cache to the deploy-exclude list --- deploy-exclude.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy-exclude.lst b/deploy-exclude.lst index 900f27113..a0771a474 100644 --- a/deploy-exclude.lst +++ b/deploy-exclude.lst @@ -9,3 +9,4 @@ target/* venv/* .envrc .cf/* +.pytest_cache/* From ccbad51ebdf2f5be2c99b5c8bd03b96a251c5230 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 2 Dec 2019 16:44:12 +0000 Subject: [PATCH 4/5] Move `app/.gitignore` entries to `.gitignore` `app/.gitignore` existed to list anything that we wanted ignored from the repository but not listed in `.cfignore` (which just symlinked the `.gitinore` at the root). Now `.gitignore` and `.cfignore` are split, this is no longer necessary. --- .gitignore | 2 ++ app/.gitignore | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 app/.gitignore diff --git a/.gitignore b/.gitignore index 2e35c0227..7826f245e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ var/ .installed.cfg *.egg venv/ +app/version.py # PyInstaller # Usually these files are written by a python script from a template @@ -62,6 +63,7 @@ target/ .vscode # Frontend dependencies and compiled assets +app/static app/assets/stylesheets/govuk_template/.sass-cache/ .sass-cache/ cache/ diff --git a/app/.gitignore b/app/.gitignore deleted file mode 100644 index 191f96b65..000000000 --- a/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/version.py -/static From c1de4cc51ba9ccdbbb0aed1107526ef387e79a2f Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 2 Dec 2019 17:16:54 +0000 Subject: [PATCH 5/5] Explain .gitignore & .cfignore differences --- .cfignore | 2 ++ .gitignore | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cfignore b/.cfignore index 36ac372c9..e2df42b69 100644 --- a/.cfignore +++ b/.cfignore @@ -1,3 +1,5 @@ +# This file is a copy of .gitignore except for file/folders created by the build + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/.gitignore b/.gitignore index 7826f245e..508249609 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,6 @@ var/ .installed.cfg *.egg venv/ -app/version.py # PyInstaller # Usually these files are written by a python script from a template @@ -63,14 +62,12 @@ target/ .vscode # Frontend dependencies and compiled assets -app/static app/assets/stylesheets/govuk_template/.sass-cache/ .sass-cache/ cache/ node_modules bower_components npm-debug.log -app/templates/vendor environment.sh .envrc @@ -78,3 +75,8 @@ environment.sh # CloudFoundry .cf package-lock.json + +# Files/folders created by build so not present in .cfignore +app/version.py +app/static +app/templates/vendor