Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of .gitkeep in demo-files #2304

Merged
merged 3 commits into from
Sep 25, 2024
Merged

Better handling of .gitkeep in demo-files #2304

merged 3 commits into from
Sep 25, 2024

Commits on Sep 25, 2024

  1. loaddemo: don't install ".gitkeep" files.

    Files called ".gitkeep" are used as placeholders to tell git to create
    the directory.  They shouldn't be copied as part of the demo project
    content (in fact, a file called ".gitkeep" would not be allowed by the
    file upload form.)
    
    For example, the demo active project AGlSZa5VTv5Dg09CSpoh contains no
    actual files, but the git repository includes the file
    demo-files/media/active-projects/AGlSZa5VTv5Dg09CSpoh/.gitkeep - so
    in this case, loaddemo should create an empty project directory
    media/active-projects/AGlSZa5VTv5Dg09CSpoh .
    Benjamin Moody committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    3e8875c View commit details
    Browse the repository at this point in the history
  2. loaddemo: ignore directories that already exist.

    If a directory such as 'media/active-projects/AGlSZa5VTv5Dg09CSpoh'
    already exists, and we are trying to install a demo project there,
    don't raise an error.  That directory isn't present in the git
    repository, but it might have been created in the past.
    Benjamin Moody committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ca56a5c View commit details
    Browse the repository at this point in the history
  3. TestMixin: don't install ".gitkeep" files.

    Files called ".gitkeep" are used as placeholders to tell git to create
    the directory.  They shouldn't be copied as part of the demo project
    content (in fact, a file called ".gitkeep" would not be allowed by the
    file upload form.)
    
    For example, the demo active project AGlSZa5VTv5Dg09CSpoh contains no
    actual files, but the git repository includes the file
    demo-files/media/active-projects/AGlSZa5VTv5Dg09CSpoh/.gitkeep - so in
    this case, TestMixin should create an empty project directory.
    Benjamin Moody committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7787c31 View commit details
    Browse the repository at this point in the history