[Mozilla Enterprise] Mozilla latest version

Stephen Dowdy sdowdy at ucar.edu
Mon Nov 18 19:57:22 UTC 2019


On 11/18/19 12:52 PM, Alexandre GAUVRIT wrote:
> Hi,
> 
> We recently found out that Google provides a website for their latest release of Chrome, for every channel/plateform/architecture : https://omahaproxy.appspot.com/
> 
> They provide a CSV + JSON with parameters (https://omahaproxy.appspot.com/all?os=win64 / https://omahaproxy.appspot.com/all.json?os=win64&channel=stable), easy to download + parse to track latest release and compliance
> 
> Would this be possible in the future for Mozilla products ?
> 
> This would be better than actual dirty directory listing scraping.

There is.  Only good luck counting on anything, as this is at least the 3rd iteration i've had to go through as Mozilla developers forget the past and re-implement new ways for stuff they already did. :-(


POSIX Shell functions:
(adjust as necessary)

banner() {
sep="--------------------------------------------------------------------------"
     printf "%s\n[ %s ]\n" "${sep}" "${@}"
}

latest_firefox() {
banner "Mozilla Firefox"
#curl --silent --head 'https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US' | sed -ne '/^Location:/{s=^.*/releases/==;s=/.*$==;p}'
# (requires 'jq') curl --silent 'https://product-details.mozilla.org/1.0/firefox_versions.json' | jq -r .LATEST_FIREFOX_VERSION
# (doesn't work in RHEL) perl -e 'use JSON qw/from_json/; use LWP::Simple qw/get/; my $ffv = from_json(get("https://product-details.mozilla.org/1.0/firefox_versions.json")); print "$ffv->{'LATEST_FIREFOX_VERSION'}","\n";'
curl -s https://product-details.mozilla.org/1.0/firefox_versions.json  | perl -0777 -MJSON -e '$t=from_json(<>); print "$t->{'LATEST_FIREFOX_VERSION'}","\n";'
}

latest_firefox_esr() {
banner "Mozilla Firefox-ESR (Extended Support Release)"
#---curl --silent --head 'https://download.mozilla.org/?product=firefox-esr-latest&os=linux64&lang=en-US' | sed -ne '/^Location:/{s=^.*/releases/==;s=/.*$==;p}'
curl -s https://product-details.mozilla.org/1.0/firefox_versions.json  | perl -0777 -MJSON -e '$t=from_json(<>); print "$t->{'FIREFOX_ESR'}","\n";'

}

latest_thunderbird() {
banner "Mozilla Thunderbird"
# curl --silent --head 'https://download.mozilla.org/?product=thunderbird-latest&os=linux64&lang=en-US' | sed -ne '/^Location:/{s=^.*/releases/==;s=/.*$==;p}'
curl -s https://product-details.mozilla.org/1.0/thunderbird_versions.json  | perl -0777 -MJSON -e '$t=from_json(<>); print "$t->{'LATEST_THUNDERBIRD_VERSION'}","\n";'
}


also...

latest_adoptopenjdk_java() {
for product in openjdk8 openjdk11 openjdk12; do
     curl -s -L 'https://api.adoptopenjdk.net/v2/latestAssets/releases/'${product}'?os=linux&arch=x64&heap_size=normal&openjdk_impl=hotspot&type=jdk' \
         | perl -0777 -mstrict -mwarnings  -MJSON -e '$t=from_json(<>); print "$t->[0]->{'''release_name'''}","\n" '
done
}


and on and on and on....


More information about the Enterprise mailing list