Skip to content

Commit

Permalink
validate existence of fly.toml earlier when deploy-only
Browse files Browse the repository at this point in the history
  • Loading branch information
jphenow committed Oct 23, 2024
1 parent 3a32452 commit 8efd9b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
in_step Step::GIT_PULL do
ref = get_env("GIT_REF")
artifact Artifact::GIT_INFO, { repository: GIT_REPO, reference: ref }

exec_capture("git init", log: false)

redacted_repo_url = GIT_REPO_URL.dup
Expand Down Expand Up @@ -118,7 +118,9 @@
""
end

if !DEPLOY_ONLY
if DEPLOY_ONLY
event :error, {type: :validation, message: "missing fly.toml" } if !HAS_FLY_CONFIG
else
MANIFEST_PATH = "/tmp/manifest.json"

manifest = in_step Step::PLAN do
Expand Down Expand Up @@ -199,7 +201,7 @@
plugin = FLYCTL_TO_ASDF_PLUGIN_NAME.fetch(RUNTIME_LANGUAGE, RUNTIME_LANGUAGE)
if plugin == "elixir"
# required for elixir to work
exec_capture("asdf install erlang #{DEFAULT_ERLANG_VERSION}")
exec_capture("asdf install erlang #{DEFAULT_ERLANG_VERSION}")
end
exec_capture("asdf install #{plugin} #{version}")
else
Expand Down Expand Up @@ -442,4 +444,4 @@
$stderr.flush

sleep 1.0
end
end

0 comments on commit 8efd9b6

Please sign in to comment.