Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
when you release a new version of your package and you have removed some files.
How can we do the same when someone upgrades to this new version using the Packages tree in the Developer section?
Can we use Package Actions to perform this task?
Its about .html files that we want to delete from the package.
I would recommend using a migration to do this, since this is an upgrade you can check in the Up() method of the migration what files are still there and delete them accordingly.
It's not fool-proof though, as we know: people will be running this and seeing in git: hey, some files have been deleted, I better revert them, they could be important.
By far the biggest benefit of doing this using a migration is that the cleanup will run on every environment it is deploy to, so if someone updates on their local machine and pushes changes to live, the migration will run again.
Read more about migrations here: https://cultiv.nl/blog/using-umbraco-migrations-to-deploy-changes/
This post deals with database changes, but you can run any C# code you want. Be careful though, make sure you don't cause any YSODs doing this, people will get upset.. ;-)
Then maybe it will be the best to just let the unused files stay in the folder.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted