Skip to content

Commit

Permalink
fix: ext_name is used in the directory structure
Browse files Browse the repository at this point in the history
The service name is taken from the file e.g. event_store.service so if
ext_name has hyphens these won't match up and we'll get errors like

LifecycleEvent - AfterInstall
Script - bin/deploy-extract-release
[stdout]==> Removing previous release /srv/event-store/current
[stdout]==> Extracting release from tar file /opt/codedeploy-agent/deployment-root/5b9577ac-428f-4dbf-82ce-79d9fe70d88a/d-7N1LS0I86/deployment-archive/bin/../event_store.tar.gz
Script - bin/deploy-set-perms
Script - bin/deploy-enable
[stdout]==> Enabling systemd unit event_store
[stderr]Failed to enable unit: Unit file event_store.service does not exist.
  • Loading branch information
puzza007 committed May 21, 2024
1 parent 1f31a75 commit 732a8ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/mix/tasks/deploy.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ defmodule Mix.Tasks.Deploy do

service_name = app_name |> to_string()

ext_name =
app_name
ext_name = app_name
|> to_string
|> String.replace("_", "-")

Expand Down

0 comments on commit 732a8ce

Please sign in to comment.