In my check-if-any-updates-are-available-script that uses ./build versions
I have a comment saying that ./build versions
would have an exit code indicating the number of available updates, or 0 if no updates were available. It seems like this behaviour has changed, is that correct?
Just tested it out - yes, the behaviour has changed but this was not intentional. We still count the number of updates but it gets lost by counting loop being executed in a subshell. So this is a bug and we will fix it. Thanks for reporting it
!
Second question, the now removed ./build versions_json
that I also use in the same script, used to return the key security
to indicate any EOL software that was installed. Is this key also present in the result from the custombuild api, or is it gone?
Special key
security
is completely removed. In normal
./build versions
output (not JSON) it used to be shown as
Security update is available.:... . We removed it completely because the only way to trigger it was by having
MySQL 5.5
or
MariaDB 10.1
. No other software were checked or reported.
The expected way to handle situations where CustomBuild no longer supports some software versions would be to throw an error explaining why CB refuses to run. This is the method used already for refusing to run CB on systems with mod_php.
Is its format documented somewhere?
Yes, CB API is documentation is available inside the DirectAdmin GUI. Evolution skin -> User Level -> Support & Help -> Live API Documentation.
The documentation is available in Swagger format, there are a lot of open source tools to read it. By using API spec from your server you will always get up to date version of the API documentation. The spec file is available at
https://server.example.com:2222/docs/swagger.json
(this file is rendered in the Evolution API docs page). For example you could use the swagger viewer at swagger.io and pull the API docs spec from our demo server at demo.directadmin.com here is the
link for it.
And related - since ./build update
now doesn't seem to fetch new available versions (?) what's the command I need to run to make sure ./build versions
or the custombuild api/updates returns the latest available updates?
You can get latest software version updates by updating DA, from CLI that would be
da update
command. Commands
./build update
and
./build update_script
are aliases to
da update
.