projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc42e71
)
OpenAPI spec task: Load pleroma application to get version info
author
rinpatch
<rinpatch@sdf.org>
Tue, 9 Feb 2021 19:10:09 +0000
(22:10 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Tue, 9 Feb 2021 19:10:09 +0000
(22:10 +0300)
For whatever reason it seems to pick up the version without loading the
app on my machine, but not on the CI.
lib/mix/tasks/pleroma/openapi_spec.ex
patch
|
blob
|
history
diff --git
a/lib/mix/tasks/pleroma/openapi_spec.ex
b/lib/mix/tasks/pleroma/openapi_spec.ex
index 524bf514427633fe78cc8b150940070d8286c0bf..8f719c58b71b069a14314f48fa1b568d9ebafe89 100644
(file)
--- a/
lib/mix/tasks/pleroma/openapi_spec.ex
+++ b/
lib/mix/tasks/pleroma/openapi_spec.ex
@@
-1,5
+1,7
@@
defmodule Mix.Tasks.Pleroma.OpenapiSpec do
def run([path]) do
+ # Load Pleroma application to get version info
+ Application.load(:pleroma)
spec = Pleroma.Web.ApiSpec.spec(server_specific: false) |> Jason.encode!()
File.write(path, spec)
end