Hello!
Is it possible to deploy an AppStudio WebApp to Volt using CLI commands?
(this would allow for some postprocessing before uploading)
Hello!
Is it possible to deploy an AppStudio WebApp to Volt using CLI commands?
(this would allow for some postprocessing before uploading)
Sorry - Not at this time.
What do you need to do?
Well, as mentioned in other topics (and I mentioned only a few), I run across several problems when using AppStudio under macOS - being able to post-process the .js and .html files would allow me to remove encoding problems or inject (temporary) workarounds for these problems
I’ve already found out how to upload a ZIP archive using the dashboard - thus, I could
The question is now, how I could automate the upload…
I’d be happy to help you with this, but you’re going to need a utility that can handle multi-part form uploads. I think wget
might be able to do that, but I’m not sure. What OS are you using?
I’m using macOS.
Using browser means, I already converted the ZIP file upload into a curl command. There seems to be some kind of (OAuth?) token that has to be sent along the request - and some cookie settings (are those required?) Additionally, there seems to be a “version” setting which looks like a UNIX epoch timestamp (but I did not check that yet)
Assuming that the bearer token does not expire too often, I could probably simply reuse the same curl command for future uploads. Otherwise, I would need to implement the (OAuth?) authentication mechanism.
I’m also familiar with Postman which could be quite handy in that situation.
Some kind of documentation might be useful.
The Volt API documentation’s description of authentication should be enough to get you started: Volt API
We don’t publish documentation for the app portion of the API (that may change in the future) but I’m happy to include an excerpt here:
POST /app/{appid}/version
Request (multipart/form-data)
A
file
parameter is required. It should contain.zip
archive of the project. An optionalfull
parameter can be passed. Iffull
exists and it’s value is not 0, then it’s assumed the archive contains a complete, rather than a differential version of the app. Differential archives contain only changed files, complete archives contain all files. In the case of a complete archive, the old project files are completely removed.
You should easily be able to submit the request with curl. Please let me know if I can help further.
I see.
This looks as if I would now have all the pieces I need to automate updating.
Thank you very much for your effort!