diff --git a/CHANGELOG.md b/CHANGELOG.md index b7b8b3c73..822c60451 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# 12.0.1 + + * See release notes for 12.0.0 + # 12.0.0 * Migrate OTA system to an in-house solution. diff --git a/VERSION b/VERSION index 4044f9086..b700dc1d4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.0.0 +12.0.1 diff --git a/farmbot_os/platform/target/sys_calls_check_update.ex b/farmbot_os/platform/target/sys_calls_check_update.ex deleted file mode 100644 index f4f160e15..000000000 --- a/farmbot_os/platform/target/sys_calls_check_update.ex +++ /dev/null @@ -1,44 +0,0 @@ -defmodule FarmbotOS.SysCalls.CheckUpdate do - @moduledoc false - require FarmbotCore.Logger - - alias FarmbotOS.{ - UpdateSupport, - UpdateProgress - } - - def check_update() do - if UpdateSupport.in_progress?() do - dont_check_update() - else - do_check_update() - end - end - - def dont_check_update() do - {:error, "Installation already started. Please wait or reboot."} - end - - def do_check_update() do - {:ok, progress_pid} = UpdateProgress.start_link([]) - # Try to find the upgrade image URL (might be `nil`) - url_or_nil = - UpdateSupport.get_target() - |> UpdateSupport.download_meta_data() - |> Map.get("image_url", nil) - - with :ok <- UpdateSupport.install_update(url_or_nil) do - UpdateProgress.set(progress_pid, 100) - FarmbotCeleryScript.SysCalls.reboot() - else - {:error, error} -> terminate(error, progress_pid) - error -> terminate(error, progress_pid) - end - end - - def terminate(error, progress_pid) do - FarmbotCore.Logger.debug(3, "Upgrade halted: #{inspect(error)}") - UpdateProgress.set(progress_pid, 100) - {:error, error} - end -end