Open aerni opened 6 years ago
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
.
Oh interesting. Maybe we should be firing an event for that from Statamic... Will look into it, thanks!
Can't reproduce.
commit 93c4795e7649b64892005edd32fb07769921ed3e (HEAD -> testing)
Author: Captain Spock <captainspock@statatmic.com>
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?
I am also running into this issue using the following setup:
2.11.3
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
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 fileentry.md
. I had to add, commit and push it myself. Great, if this can be fixed.