Update commit for circle deploy

This commit is contained in:
connor rigby 2018-01-03 14:47:43 -08:00 committed by Connor Rigby
parent 86d6e773ec
commit 7e09c64fd4
4 changed files with 5 additions and 3 deletions

View file

@ -93,7 +93,7 @@ jobs:
- restore_cache:
key: v3-firmware-{{ .Revision }}-{{ .Environment.CIRCLE_TAG }}
- run:
command: ./ghr -t $GITHUB_TOKEN -u farmbot -r farmbot_os -recreate -prerelease -b "$(cat RELEASE_NOTES)" -c "$(git log --pretty=format:%h -1)" "v$(cat VERSION)-beta" $PWD/artifacts
command: ./ghr -t $GITHUB_TOKEN -u farmbot -r farmbot_os -recreate -prerelease -b "$(cat RELEASE_NOTES)" -c $(git rev-parse --verify HEAD) "v$(cat VERSION)-beta" $PWD/artifacts
workflows:
version: 2

View file

@ -7,6 +7,7 @@ defmodule Farmbot.CeleryScript.AST.Node.CheckUpdates do
env = mutate_env(env)
case Farmbot.System.Updates.check_updates() do
:ok -> {:ok, env}
:no_update -> {:ok, env}
_ -> {:error, "Failed to check updates", env}
end
end

View file

@ -73,6 +73,8 @@ defmodule Farmbot.System.Updates do
# Logger.info 1, "Downloading update. Here is the release notes"
# Logger.info 1, cl
do_download_and_apply(fw_url, new_version)
else
:no_update
end
else
:error ->

View file

@ -4,8 +4,7 @@ defmodule Farmbot.Mixfile do
@version Path.join(__DIR__, "VERSION") |> File.read!() |> String.trim()
defp commit() do
{t, _} = System.cmd("git", ["log", "--pretty=format:%h", "-1"])
t
System.cmd("git", ~w"rev-parse --verify HEAD") |> elem(0) |> String.trim()
end
Mix.shell().info([