Skip to content

Commit

Permalink
Merge branch 'release/v8.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Oct 26, 2023
2 parents 9950af0 + 37f845f commit 968541f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ runs:
uses: actions/cache@v3
with:
path: ~/.mix
key: ${{ runner.arch }}-alpine-${{ inputs.alpine }}-pakman-8.1.3
key: ${{ runner.arch }}-alpine-${{ inputs.alpine }}-pakman-8.1.4

- name: Install Pakman
if: steps.cache-pakman.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix escript.install hex pakman 8.1.3 --force
mix escript.install hex pakman 8.1.4 --force
shell: alpine.sh {0}
env:
MIX_ENV: prod
2 changes: 1 addition & 1 deletion lib/pakman/bootstrap/templates/initd.eex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ s6_service_path="${RC_SVCDIR}/s6-scan/<%= configuration["name"] %>"

<%= Enum.map(commands, fn command -> %>
<%= command["name"] %>() {
<%= rendered_command = if command["path"],
<% rendered_command = if command["path"],
do: "#{command["path"]}/#{command["binary"]}",
else: "/var/lib/#{configuration["name"]}/bin/#{command["binary"]}" %>
export HOME=/var/lib/<%= configuration["name"] %>
Expand Down
10 changes: 9 additions & 1 deletion lib/pakman/instellar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,18 @@ defmodule Pakman.Instellar do
[
{Tesla.Middleware.BaseUrl, endpoint},
Tesla.Middleware.JSON,
{Tesla.Middleware.Logger, debug: false}
{Tesla.Middleware.Logger,
debug: false, log_level: &custom_log_level/1}
]
end

Tesla.client(middleware)
end

defp custom_log_level(env) do
case env.status do
404 -> :info
_ -> :default
end
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Pakman.MixProject do
def project do
[
app: :pakman,
version: "8.1.3",
version: "8.1.4",
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down
8 changes: 6 additions & 2 deletions test/pakman/push_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ defmodule Pakman.PushTest do
Bypass.expect(bypass, "GET", "/publish/deployments/somesha", fn conn ->
conn
|> Plug.Conn.put_resp_header("content-type", "application/json")
|> Plug.Conn.resp(404, Jason.encode!(%{data: %{errors: %{detail: "not_found"}}}))
|> Plug.Conn.resp(
404,
Jason.encode!(%{data: %{errors: %{detail: "not_found"}}})
)
end)

Bypass.expect(bypass, "GET", "/publish/storage", fn conn ->
Expand Down Expand Up @@ -114,7 +117,8 @@ defmodule Pakman.PushTest do
|> Plug.Conn.resp(200, Jason.encode!(%{data: %{attributes: %{id: 1}}}))
end)

assert {:ok, :already_exists} = Push.perform(config: "test/fixtures/rails.yml")
assert {:ok, :already_exists} =
Push.perform(config: "test/fixtures/rails.yml")
end
end
end

0 comments on commit 968541f

Please sign in to comment.