Skip to content

Commit

Permalink
Merge branch 'release/v8.2.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed May 29, 2024
2 parents 87fd146 + f1a6f9f commit 95d5d29
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 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@v4
with:
path: ~/.mix
key: ${{ runner.arch }}-alpine-${{ inputs.alpine }}-pakman-8.2.8
key: ${{ runner.arch }}-alpine-${{ inputs.alpine }}-pakman-8.2.9

- 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.2.8 --force
mix escript.install hex pakman 8.2.9 --force
shell: alpine.sh {0}
env:
MIX_ENV: prod
4 changes: 4 additions & 0 deletions lib/pakman/bootstrap.ex
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ defmodule Pakman.Bootstrap do
|> Path.join()
|> File.write!(Templates.run(configuration))

[base_path, "#{name}.finish"]
|> Path.join()
|> File.write!(Templates.finish(configuration))

[base_path, "#{name}.log"]
|> Path.join()
|> File.write!(Templates.log(name))
Expand Down
9 changes: 9 additions & 0 deletions lib/pakman/bootstrap/templates.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ defmodule Pakman.Bootstrap.Templates do
]
)

EEx.function_from_file(
:def,
:finish,
Path.join(@prefix, "finish.eex"),
[
:configuration
]
)

EEx.function_from_file(
:def,
:pre_install,
Expand Down
2 changes: 2 additions & 0 deletions lib/pakman/bootstrap/templates/apkbuild.eex
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ source="
<%= if configuration["type"] not in ["static", "custom"] do %>
$pkgname.initd
$pkgname.run
$pkgname.finish
$pkgname.log
$pkgname.environment
$pkgname.env-exec
Expand Down Expand Up @@ -73,6 +74,7 @@ package() {
<% else %>
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm755 "$srcdir"/$pkgname.run "$pkgdir"/var/lib/$pkgname/service/run
install -Dm755 "$srcdir"/$pkgname.finish "$pkgdir"/var/lib/$pkgname/service/finish
install -Dm755 "$srcdir"/$pkgname.log "$pkgdir"/var/lib/$pkgname/service/log/run
install -Dm755 "$srcdir"/$pkgname.environment "$pkgdir"/var/lib/$pkgname/bin/environment
install -Dm755 "$srcdir"/$pkgname.env-exec "$pkgdir"/var/lib/$pkgname/bin/env-exec
Expand Down
2 changes: 2 additions & 0 deletions lib/pakman/bootstrap/templates/finish.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/execlineb -P

Check warning on line 1 in lib/pakman/bootstrap/templates/finish.eex

View workflow job for this annotation

GitHub Actions / Publish to hex

variable "configuration" is unused (if the variable is not meant to be used, prefix it with an underscore)
s6-permafailon 60 5 1,101-103,SIGSEGV,SIGBUS
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.2.8",
version: "8.2.9",
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit 95d5d29

Please sign in to comment.