brian-mcnamara/plugin_uploader

Publish to local directory

Closed this issue · 7 comments

I use GitHub Pages to host my updatePlugins.xml, 'cause it's quick, easy, and I only have a single plugin to support. But I've been manually editing the XML thus far, and I would love to automate this. Would it be possible to use this project to simply write out updatePlugins.xml to a specified directory?

I drew up some code that works for me locally: master...theY4Kman:plugin_uploader:feat/add-local-repo-type

I'm not really well-versed in best practices for Java file IO, nor what sort of language features might be inappropriate to include in a PR — but most importantly, I don't know how to write tests for it, so I haven't submitted a PR

I think we can make this happen. Let me spend more time in your code, my initial thought was maybe a new task would be more "appropriate" since updating the file is not uploading anything...

That makes sense to me. Setting url for a path felt a bit wonky. Plus, absolute URL generation won't work without a separate public URL; I'm
currently fixing it with string manipulation after updating the XML.

Sorry for the delay @theY4Kman, been in a middle of a move so have had no time to implement this. That said, I was looking over how to do this and my original idea of just pulling this out into a reusable task that I could use within the upload plugin does not seem possible due to how the upload plugin does synchronous locking. However, I can easily pull the logic out into a common helper which gets used in the upload plugin and create a standalone task which you can use for this use case.

Hoping to get to this in the coming weeks as the move is (finally) nearing completion.

Ok, #12 will allow you to update a file. Still need some more thought into the task name, since I think IJ already has a updatePluginXml, so the name will probably change :)

Just go full Java and call it updateUpdatePluginsXml ;) Though, I think JB has separate updatePluginXml and patchPluginXml tasks.

No apologies necessary on the time. As someone who maintains 20-30 open-source projects on top of a full-time job and a family, I'm surprised anything happens at all, ever, on any project. And I consider moving one of the most stressful ventures we undertake.

I ended up not registering the task in the plugin so naming is no longer an issue 😃 . Anyway 1.3.2 was published today. The README has an example of how to add it to your project. Let me know if there are any issues!