Skip to content

Unexpected behaviour with files not tracked by Git #58

Closed

Description

@Lewiscowles1986

Thank you for writing this cool GitHub action. I've been putting off seeing how it works until now, but I feel I now have a fairly good idea of it, along with some ways to use this to do something that was manual for me until this point 🏆 to you all.

Describe the bug

When generating or adding files to the filesystem in a github action, the files will not be deployed via SVN unless they are comitted to the repo.

Steps to Reproduce

  1. Before running this action, touch or cat to create a file
  2. Run this action
  3. Notice that the new file is missing

Expected behavior

Files added during release action are transferred automatically for principal of least surprise.

Additional context

I have a plugin with a non-trivial build step. It uses composer to get dependencies and then copies them into a folder.

At first I was blaming the php-actions/composer, but I added a step to check ls -lhaR and it showed my files. It was only after combing every line I realised what this was doing 😆. I Think it's kind of genius to use git archive in this way, but it does lead to user surprise so should likely be documented.

Activity

  1. added
    type:bug
    on Oct 22, 2020
  2. helen commented on Jan 28, 2021

    @helen
    Collaborator

    Hello! You'll want to include a .distignore file if you are including anything built or otherwise created but not committed. It's mentioned in the section above what you've added in your PR, although it does not explicitly mention uncommitted files.

  3. Lewiscowles1986 commented on Jan 28, 2021

    @Lewiscowles1986
    Author

    Could the wording of the .distignore section (it's mentioned in a few places), be more explicit?

    I Checked the shell script and can see what you are saying, but the text doesn't make the behavior any more clear. I was still surprised, and am, equally as surprised as it seems a long way to go to avoid having a build folder that is deployed verbatim.

  4. helen commented on Jan 28, 2021

    @helen
    Collaborator

    @Lewiscowles1986 Not sure what you mean by "a long way to go" - are you talking about including uncommitted files or are you talking about deploying from a separate directory? For the latter, that's also something there's interest in, see #30. For the former, I don't see that .distignore is significantly more work, again we use this in our own plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions