remote: update to release feature

This commit is contained in:
rusefillc 2020-10-07 20:26:56 -04:00
parent 0f58c906e4
commit bad9da98ff
2 changed files with 5 additions and 2 deletions

View File

@ -29,10 +29,12 @@ public class Autoupdate {
String bundleFullName = readBundleFullName();
if (args.length > 0 && args[0].equalsIgnoreCase("release")) {
System.out.println("Release update requested");
handleBundle(bundleFullName, UpdateMode.ALWAYS, ConnectionAndMeta.BASE_URL_RELEASE);
return;
}
System.out.println("Latest update requested");
UpdateMode mode = getMode();
if (mode != UpdateMode.NEVER) {
if (bundleFullName != null) {
@ -73,6 +75,7 @@ public class Autoupdate {
try {
String zipFileName = bundleFullName + "_autoupdate" + ".zip";
ConnectionAndMeta connectionAndMeta = new ConnectionAndMeta(zipFileName).invoke(baseUrl);
System.out.println("Remote file " + zipFileName);
System.out.println("Server has " + connectionAndMeta.getCompleteFileSize() + " from " + new Date(connectionAndMeta.getLastModified()));
if (AutoupdateUtil.hasExistingFile(zipFileName, connectionAndMeta.getCompleteFileSize(), connectionAndMeta.getLastModified())) {

View File

@ -15,7 +15,7 @@ do
fi
# in java code that's UPDATE_RELEASE_SBC_EXIT_CODE magic number
if [ $exit_status -eq 17 ]; then
echo Connector software update to latest was requested
echo Connector software update to release was requested
bin/update_bundle_release.sh
fi
# in java code that's UPDATE_FIRMWARE_EXIT_CODE magic number