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

Spock doesn't track unpublished collection entry #24

Open
aerni opened this issue Oct 12, 2018 · 4 comments
Open

Spock doesn't track unpublished collection entry #24

aerni opened this issue Oct 12, 2018 · 4 comments

Comments

@aerni
Copy link

aerni commented Oct 12, 2018

When unpublishing a collection entry, Spock adds, commits and pushes the unpublished file with the underscore e.g. _entry.md as expected. But it doesn't track the deleted file entry.md. I had to add, commit and push it myself. Great, if this can be fixed.

@aerni
Copy link
Author

aerni commented Oct 12, 2018

The same thing happens when publishing an unpublished entry. Spock adds, commits and pushed the published file e.g. entry.md but doesn't track the deleted file _entry.md.

@jesseleite
Copy link
Member

Oh interesting. Maybe we should be firing an event for that from Statamic... Will look into it, thanks!

@jesseleite
Copy link
Member

jesseleite commented Oct 26, 2018

Can't reproduce.

commit 93c4795e7649b64892005edd32fb07769921ed3e (HEAD -> testing)
Author: Captain Spock <[email protected]>
Date:   Fri Oct 26 11:02:06 2018 -0400

    Entry saved by jlo

diff --git a/app/site/content/collections/things/_a-new-entry-from-spock.md b/app/site/content/collections/things/a-new-entry-from-spock.md
similarity index 100%
rename from app/site/content/collections/things/_a-new-entry-from-spock.md
rename to app/site/content/collections/things/a-new-entry-from-spock.md

It's committing both fine for me 🤔 What versions of statamic and spock are you running?

@wanze
Copy link

wanze commented Dec 14, 2018

I am also running into this issue using the following setup:

  • Statamic 2.11.3
  • Spock 2.1.0

Ignored events:

  - Statamic\Events\Data\AssetUploaded
  - Statamic\Events\Data\AssetMoved
  - Statamic\Events\Data\AssetDeleted
  - Statamic\Events\Data\FileUploaded

My current solution is to use a custom after command:

- if (( $(git status -s | wc -l) > 0 )); then git add --all && git commit -m "[skip-ci] Additional changes after running Spock" && git push; fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants