From 83663caa81f1ccca37fe3898feb4ec2d829ad893 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sun, 2 Jun 2019 17:45:32 +0300 Subject: Ueberauth: extended format of OAUTH_CONSUMER_STRATEGIES to allow explicit dependency specification. --- mix.exs | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index b2017ef9b..df1a7ced4 100644 --- a/mix.exs +++ b/mix.exs @@ -51,16 +51,27 @@ defmodule Pleroma.Mixfile do defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] + # Specifies OAuth dependencies. + defp oauth_deps do + oauth_strategy_packages = + System.get_env("OAUTH_CONSUMER_STRATEGIES") + |> to_string() + |> String.split() + |> Enum.map(fn strategy_entry -> + with [_strategy, dependency] <- String.split(strategy_entry, ":") do + dependency + else + [strategy] -> "ueberauth_#{strategy}" + end + end) + + for s <- oauth_strategy_packages, do: {String.to_atom(s), ">= 0.0.0"} + end + # Specifies your project dependencies. # # Type `mix help deps` for examples and options. defp deps do - oauth_strategies = String.split(System.get_env("OAUTH_CONSUMER_STRATEGIES") || "") - - oauth_deps = - for s <- oauth_strategies, - do: {String.to_atom("ueberauth_#{s}"), ">= 0.0.0"} - [ {:phoenix, "~> 1.4.1"}, {:plug_cowboy, "~> 2.0"}, @@ -121,7 +132,7 @@ defmodule Pleroma.Mixfile do {:ex_rated, "~> 1.2"}, {:plug_static_index_html, "~> 1.0.0"}, {:excoveralls, "~> 0.11.1", only: :test} - ] ++ oauth_deps + ] ++ oauth_deps() end # Aliases are shortcuts or tasks specific to the current project. -- cgit v1.2.3 From b5e3b1e58ad9f4d8237821572e4d149eea881ff2 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 4 Jun 2019 16:44:56 +0200 Subject: Mix: Swallow git error messages during version number handling. Otherwise sometimes a 'fatal' message will be printed, confusing users. --- mix.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index df1a7ced4..9447a2e4f 100644 --- a/mix.exs +++ b/mix.exs @@ -157,7 +157,8 @@ defmodule Pleroma.Mixfile do # * the mix environment if different than prod defp version(version) do {git_tag, git_pre_release} = - with {tag, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=0"]), + with {tag, 0} <- + System.cmd("git", ["describe", "--tags", "--abbrev=0"], stderr_to_stdout: true), tag = String.trim(tag), {describe, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=8"]), describe = String.trim(describe), -- cgit v1.2.3 From c47dc0de2c567195206523a057c7df067d6fb076 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 8 Jun 2019 17:17:10 +0300 Subject: Load ex_syslog and copy pleroma_ctl --- mix.exs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 9447a2e4f..a6481bab6 100644 --- a/mix.exs +++ b/mix.exs @@ -32,10 +32,22 @@ defmodule Pleroma.Mixfile do ], main: "readme", output: "priv/static/doc" + ], + releases: [ + pleroma: [ + include_executables_for: [:unix], + applications: [ex_syslogger: :load, syslog: :load], + steps: [:assemble, ©_pleroma_ctl/1] + ] ] ] end + def copy_pleroma_ctl(%{path: target_path} = release) do + File.cp!("./rel/pleroma_ctl", Path.join([target_path, "bin", "pleroma_ctl"])) + release + end + # Configuration for the OTP application. # # Type `mix help compile.app` for more information. -- cgit v1.2.3 From 2e5affce61a9255602d3a5d4c5caced9f09b1f5a Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Tue, 11 Jun 2019 14:27:41 +0700 Subject: Add RateLimiter --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 9447a2e4f..1b78c5ca8 100644 --- a/mix.exs +++ b/mix.exs @@ -129,7 +129,7 @@ defmodule Pleroma.Mixfile do {:quack, "~> 0.1.1"}, {:benchee, "~> 1.0"}, {:esshd, "~> 0.1.0", runtime: Application.get_env(:esshd, :enabled, false)}, - {:ex_rated, "~> 1.2"}, + {:ex_rated, "~> 1.3"}, {:plug_static_index_html, "~> 1.0.0"}, {:excoveralls, "~> 0.11.1", only: :test} ] ++ oauth_deps() -- cgit v1.2.3 From bf22ed5fbd5d5087eb08e0bf0dc2ff6a29e90e0d Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 12 Jun 2019 15:53:33 +0700 Subject: Update `auto_linker` dependency --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index bfa9bf18b..db7a30f99 100644 --- a/mix.exs +++ b/mix.exs @@ -126,7 +126,7 @@ defmodule Pleroma.Mixfile do {:ueberauth, "~> 0.4"}, {:auto_linker, git: "https://git.pleroma.social/pleroma/auto_linker.git", - ref: "c00c4e75b35367fa42c95ffd9b8c455bf9995829"}, + ref: "e2385402bcd24fc659fee83b3eb8863b0528ad42"}, {:http_signatures, git: "https://git.pleroma.social/pleroma/http_signatures.git", ref: "9789401987096ead65646b52b5a2ca6bf52fc531"}, -- cgit v1.2.3 From 315f090f59810ff9eb75ad503beb5f7f9cdbc0d5 Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 13 Jun 2019 19:29:02 +0200 Subject: Prometheus: Remove flaky process collection NIF. --- mix.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index db7a30f99..a38ea590a 100644 --- a/mix.exs +++ b/mix.exs @@ -136,7 +136,6 @@ defmodule Pleroma.Mixfile do {:prometheus_plugs, "~> 1.1"}, {:prometheus_phoenix, "~> 1.2"}, {:prometheus_ecto, "~> 1.4"}, - {:prometheus_process_collector, "~> 1.4"}, {:recon, github: "ferd/recon", tag: "2.4.0"}, {:quack, "~> 0.1.1"}, {:benchee, "~> 1.0"}, -- cgit v1.2.3 From baf58c12341b79d1df348f8b5e5f0e3d84edc0e6 Mon Sep 17 00:00:00 2001 From: Alex S Date: Sat, 15 Jun 2019 12:02:21 +0800 Subject: version generation --- mix.exs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index a38ea590a..3e3a21e42 100644 --- a/mix.exs +++ b/mix.exs @@ -176,7 +176,9 @@ defmodule Pleroma.Mixfile do ahead <- String.replace(describe, tag, "") do {String.replace_prefix(tag, "v", ""), if(ahead != "", do: String.trim(ahead))} else - _ -> {nil, nil} + _ -> + {commit_hash, 0} = System.cmd("git", ["rev-parse", "--short", "HEAD"]) + {nil, "-g" <> String.trim(commit_hash)} end if git_tag && version != git_tag do @@ -203,8 +205,18 @@ defmodule Pleroma.Mixfile do string -> "+" <> string end).() - [version, git_pre_release, build] - |> Enum.filter(fn string -> string && string != "" end) - |> Enum.join() + branch_name = + with {branch_name, 0} <- System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]), + true <- branch_name != "master" do + "-" <> String.trim(branch_name) + end + + full_version = + [version, git_pre_release, branch_name, build] + |> Enum.filter(fn string -> string && string != "" end) + |> Enum.join() + + Mix.shell().info("Project version: #{full_version}") + full_version end end -- cgit v1.2.3 From 501705438f3223363312cc955a8e7b06722a1265 Mon Sep 17 00:00:00 2001 From: Alex S Date: Sat, 15 Jun 2019 16:24:49 +0800 Subject: little fix --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 3e3a21e42..f82ae5243 100644 --- a/mix.exs +++ b/mix.exs @@ -178,7 +178,7 @@ defmodule Pleroma.Mixfile do else _ -> {commit_hash, 0} = System.cmd("git", ["rev-parse", "--short", "HEAD"]) - {nil, "-g" <> String.trim(commit_hash)} + {nil, "-0-g" <> String.trim(commit_hash)} end if git_tag && version != git_tag do -- cgit v1.2.3 From e02f22d7790865be3f4d0b3d709d707c020a9ab7 Mon Sep 17 00:00:00 2001 From: Alex S Date: Sat, 15 Jun 2019 16:36:13 +0800 Subject: bugfix --- mix.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index f82ae5243..a52debc91 100644 --- a/mix.exs +++ b/mix.exs @@ -208,7 +208,11 @@ defmodule Pleroma.Mixfile do branch_name = with {branch_name, 0} <- System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]), true <- branch_name != "master" do - "-" <> String.trim(branch_name) + branch_name = + String.trim(branch_name) + |> String.replace(~r/\W+/, "-") + + "-" <> branch_name end full_version = -- cgit v1.2.3 From 2ad5a8511d93e1e2b30a4798998393c61e981fa5 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 15 Jun 2019 07:03:26 -0500 Subject: Update Phoenix to 1.4.8 --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index a38ea590a..ee2dd6c53 100644 --- a/mix.exs +++ b/mix.exs @@ -85,7 +85,7 @@ defmodule Pleroma.Mixfile do # Type `mix help deps` for examples and options. defp deps do [ - {:phoenix, "~> 1.4.1"}, + {:phoenix, "~> 1.4.8"}, {:plug_cowboy, "~> 2.0"}, {:phoenix_pubsub, "~> 1.1"}, {:phoenix_ecto, "~> 4.0"}, -- cgit v1.2.3 From 451593f45e517db5ef81af0d3ec94c206a5e3bcd Mon Sep 17 00:00:00 2001 From: Alex S Date: Sun, 16 Jun 2019 11:48:15 +0800 Subject: no print version to the shell --- mix.exs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index a52debc91..93f2d8476 100644 --- a/mix.exs +++ b/mix.exs @@ -215,12 +215,8 @@ defmodule Pleroma.Mixfile do "-" <> branch_name end - full_version = - [version, git_pre_release, branch_name, build] - |> Enum.filter(fn string -> string && string != "" end) - |> Enum.join() - - Mix.shell().info("Project version: #{full_version}") - full_version + [version, git_pre_release, branch_name, build] + |> Enum.filter(fn string -> string && string != "" end) + |> Enum.join() end end -- cgit v1.2.3 From f30a3241d20be9407335c88fa86deb873de5b872 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 18 Jun 2019 16:08:18 +0300 Subject: Deps: Update auto_linker --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index df3253d5a..2bd1450c9 100644 --- a/mix.exs +++ b/mix.exs @@ -126,7 +126,7 @@ defmodule Pleroma.Mixfile do {:ueberauth, "~> 0.4"}, {:auto_linker, git: "https://git.pleroma.social/pleroma/auto_linker.git", - ref: "e2385402bcd24fc659fee83b3eb8863b0528ad42"}, + ref: "95e8188490e97505c56636c1379ffdf036c1fdde"}, {:http_signatures, git: "https://git.pleroma.social/pleroma/http_signatures.git", ref: "9789401987096ead65646b52b5a2ca6bf52fc531"}, -- cgit v1.2.3 From a0a1361888a3986d589720a7eb39d49c913154f2 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 19 Jun 2019 03:51:59 +0300 Subject: Refactor pleroma_ctl copying to a generic function for copying files into the release dir --- mix.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index df3253d5a..781560a0a 100644 --- a/mix.exs +++ b/mix.exs @@ -37,14 +37,14 @@ defmodule Pleroma.Mixfile do pleroma: [ include_executables_for: [:unix], applications: [ex_syslogger: :load, syslog: :load], - steps: [:assemble, ©_pleroma_ctl/1] + steps: [:assemble, ©_files/1] ] ] ] end - def copy_pleroma_ctl(%{path: target_path} = release) do - File.cp!("./rel/pleroma_ctl", Path.join([target_path, "bin", "pleroma_ctl"])) + def copy_files(%{path: target_path} = release) do + File.cp_r!("./rel/files", target_path) release end -- cgit v1.2.3 From e4fa6b99ac963fda72bf3ffc22da10346f4af839 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Wed, 19 Jun 2019 10:33:33 +0000 Subject: aliases for mix tasks ecto.migrate ecto.rollback --- mix.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 2bd1450c9..7f8e36cbb 100644 --- a/mix.exs +++ b/mix.exs @@ -154,6 +154,8 @@ defmodule Pleroma.Mixfile do # See the documentation for `Mix` for more info on aliases. defp aliases do [ + "ecto.migrate": ["pleroma.ecto.migrate"], + "ecto.rollback": ["pleroma.ecto.rollback"], "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], "ecto.reset": ["ecto.drop", "ecto.setup"], test: ["ecto.create --quiet", "ecto.migrate", "test"] -- cgit v1.2.3 From a6e3169cfc5657e5819b3e018bf4c3cdf1c1377a Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 19 Jun 2019 14:40:39 +0300 Subject: Make possible to override the branch name via a env variable This is useful for the CI builds because they have a detached HEAD or for emulating a feature that is availible only on a particular branch (e.g pleroma_ctl downloads CI artifacts only for develop and master) --- mix.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 781560a0a..ac25b7266 100644 --- a/mix.exs +++ b/mix.exs @@ -207,6 +207,7 @@ defmodule Pleroma.Mixfile do branch_name = with {branch_name, 0} <- System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]), + branch_name <- System.get_env("PLEROMA_BUILD_BRANCH") || branch_name, true <- branch_name != "master" do branch_name = String.trim(branch_name) -- cgit v1.2.3 From f07003e2183c4e13a428614bd0ce39c9e84e2da2 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Thu, 20 Jun 2019 17:54:16 +0300 Subject: Fixed mix version computed for underscore-containing branches to be of SemVer format. --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 7f8e36cbb..30584cc92 100644 --- a/mix.exs +++ b/mix.exs @@ -212,7 +212,7 @@ defmodule Pleroma.Mixfile do true <- branch_name != "master" do branch_name = String.trim(branch_name) - |> String.replace(~r/\W+/, "-") + |> String.replace(~r/[\W_]+/, "-") "-" <> branch_name end -- cgit v1.2.3 From 7e35bdbd3c51771532f77b58829c6f0e2dcd08ca Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 05:46:47 +0300 Subject: Copy the nginx config to the release directory --- mix.exs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 9fdf6e83a..dc2df01a2 100644 --- a/mix.exs +++ b/mix.exs @@ -37,7 +37,7 @@ defmodule Pleroma.Mixfile do pleroma: [ include_executables_for: [:unix], applications: [ex_syslogger: :load, syslog: :load], - steps: [:assemble, ©_files/1] + steps: [:assemble, ©_files/1, ©_nginx_config/1] ] ] ] @@ -48,6 +48,11 @@ defmodule Pleroma.Mixfile do release end + def copy_nginx_config(%{path: target_path} = release) do + File.cp!("./installation/pleroma.nginx", Path.join([target_path, "installation", "pleroma.nginx"])) + release + end + # Configuration for the OTP application. # # Type `mix help compile.app` for more information. -- cgit v1.2.3 From 267f6bedd885a00a94f8d383a6793d34b018762a Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 05:57:46 +0300 Subject: Formatting --- mix.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index dc2df01a2..bd8a10c66 100644 --- a/mix.exs +++ b/mix.exs @@ -49,7 +49,11 @@ defmodule Pleroma.Mixfile do end def copy_nginx_config(%{path: target_path} = release) do - File.cp!("./installation/pleroma.nginx", Path.join([target_path, "installation", "pleroma.nginx"])) + File.cp!( + "./installation/pleroma.nginx", + Path.join([target_path, "installation", "pleroma.nginx"]) + ) + release end -- cgit v1.2.3 From 259ffe00620ae8dd0cbfd5313024107e59f96ffc Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Fri, 21 Jun 2019 17:19:29 +0300 Subject: Fixed branch name substitutions for mix version (to comply to SemVer format). --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 30584cc92..0981ee856 100644 --- a/mix.exs +++ b/mix.exs @@ -212,7 +212,7 @@ defmodule Pleroma.Mixfile do true <- branch_name != "master" do branch_name = String.trim(branch_name) - |> String.replace(~r/[\W_]+/, "-") + |> String.replace(~r/[^0-9a-z\-\.]+/i, "-") "-" <> branch_name end -- cgit v1.2.3 From 481932309fdec83b1cfb46afda3b982d5e388497 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 21 Jun 2019 23:42:50 +0000 Subject: mix: update bbcode dependency to v0.1.1 --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 9fdf6e83a..0f57c4dae 100644 --- a/mix.exs +++ b/mix.exs @@ -108,7 +108,7 @@ defmodule Pleroma.Mixfile do {:ex_aws, "~> 2.0"}, {:ex_aws_s3, "~> 2.0"}, {:earmark, "~> 1.3"}, - {:bbcode, "~> 0.1"}, + {:bbcode, "~> 0.1.1"}, {:ex_machina, "~> 2.3", only: :test}, {:credo, "~> 0.9.3", only: [:dev, :test]}, {:mock, "~> 0.3.3", only: :test}, -- cgit v1.2.3 From da17bdd87e9e4bf681f053c7cd71ae7cf0321983 Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 28 Jun 2019 17:15:44 +0200 Subject: BUMP OF CHICKEN 1.0 --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 5484c43ef..cf413f12b 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Pleroma.Mixfile do def project do [ app: :pleroma, - version: version("0.9.0"), + version: version("1.0.0"), elixir: "~> 1.7", elixirc_paths: elixirc_paths(Mix.env()), compilers: [:phoenix, :gettext] ++ Mix.compilers(), -- cgit v1.2.3 From bdc1592377d19da67040a78faf360770c54d4e6a Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 29 Jun 2019 14:25:47 +0300 Subject: Add PLEROMA_BUILD_ENV to override env for the version generator and use it in the CI for building docs This is needed because if we run with MIX_ENV=dev we will get a "+dev" suffix to the version in the docs, but if we run with MIX_ENV=prod the docs build will fail because ex_doc is dev-only dependency. --- mix.exs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 19a80ffb2..c2618d2b2 100644 --- a/mix.exs +++ b/mix.exs @@ -207,6 +207,15 @@ defmodule Pleroma.Mixfile do env_name = if Mix.env() != :prod, do: to_string(Mix.env()) + env_override = System.get_env("PLEROMA_BUILD_ENV") + + env_name = + if env_override do + if env_override != "prod", do: env_override + else + env_name + end + build = [build_name, env_name] |> Enum.filter(fn string -> string && string != "" end) -- cgit v1.2.3 From a02f52d12a32d78aa11a86840dfdaf94b5355dfb Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Tue, 2 Jul 2019 09:04:59 +0300 Subject: [#1048] Resolved violations of SemVer version format. Refactoring. --- mix.exs | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index c2618d2b2..22d3d50df 100644 --- a/mix.exs +++ b/mix.exs @@ -174,10 +174,14 @@ defmodule Pleroma.Mixfile do # Builds a version string made of: # * the application version # * a pre-release if ahead of the tag: the describe string (-count-commithash) - # * build info: + # * branch name + # * build metadata: # * a build name if `PLEROMA_BUILD_NAME` or `:pleroma, :build_name` is defined # * the mix environment if different than prod defp version(version) do + identifier_filter = ~r/[^0-9a-z\-]+/i + + # Pre-release version, denoted from patch version with a hyphen {git_tag, git_pre_release} = with {tag, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=0"], stderr_to_stdout: true), @@ -198,6 +202,19 @@ defmodule Pleroma.Mixfile do ) end + # Branch name as pre-release version component, denoted with a dot + branch_name = + with {branch_name, 0} <- System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]), + branch_name <- System.get_env("PLEROMA_BUILD_BRANCH") || branch_name, + true <- branch_name != "master" do + branch_name = + branch_name + |> String.trim() + |> String.replace(identifier_filter, "-") + + "." <> branch_name + end + build_name = cond do name = Application.get_env(:pleroma, :build_name) -> name @@ -206,37 +223,26 @@ defmodule Pleroma.Mixfile do end env_name = if Mix.env() != :prod, do: to_string(Mix.env()) - env_override = System.get_env("PLEROMA_BUILD_ENV") env_name = - if env_override do - if env_override != "prod", do: env_override - else - env_name + case env_override do + nil -> env_name + env_override when env_override in ["", "prod"] -> nil + env_override -> env_override end - build = + # Build metadata, denoted with a plus sign + build_metadata = [build_name, env_name] |> Enum.filter(fn string -> string && string != "" end) - |> Enum.join("-") + |> Enum.join(".") |> (fn "" -> nil - string -> "+" <> string + string -> "+" <> String.replace(string, identifier_filter, "-") end).() - branch_name = - with {branch_name, 0} <- System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]), - branch_name <- System.get_env("PLEROMA_BUILD_BRANCH") || branch_name, - true <- branch_name != "master" do - branch_name = - String.trim(branch_name) - |> String.replace(~r/[^0-9a-z\-\.]+/i, "-") - - "-" <> branch_name - end - - [version, git_pre_release, branch_name, build] + [version, git_pre_release, branch_name, build_metadata] |> Enum.filter(fn string -> string && string != "" end) |> Enum.join() end -- cgit v1.2.3 From 11143c542a012f64db8db0fa7b82f063ef338e94 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 3 Jul 2019 14:42:24 +0700 Subject: Remove `httpoison` from dependencies --- mix.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index c2618d2b2..518de590d 100644 --- a/mix.exs +++ b/mix.exs @@ -109,7 +109,6 @@ defmodule Pleroma.Mixfile do {:phoenix_html, "~> 2.10"}, {:calendar, "~> 0.17.4"}, {:cachex, "~> 3.0.2"}, - {:httpoison, "~> 1.2.0"}, {:poison, "~> 3.0", override: true}, {:tesla, "~> 1.2"}, {:jason, "~> 1.0"}, -- cgit v1.2.3 From 4e6e5d80428a40f0403560b3c8381ea48cf4373e Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Tue, 9 Jul 2019 16:54:13 +0000 Subject: reverse proxy tests --- mix.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 22d3d50df..48a43fccb 100644 --- a/mix.exs +++ b/mix.exs @@ -151,7 +151,8 @@ defmodule Pleroma.Mixfile do {:esshd, "~> 0.1.0", runtime: Application.get_env(:esshd, :enabled, false)}, {:ex_rated, "~> 1.3"}, {:plug_static_index_html, "~> 1.0.0"}, - {:excoveralls, "~> 0.11.1", only: :test} + {:excoveralls, "~> 0.11.1", only: :test}, + {:mox, "~> 0.5", only: :test} ] ++ oauth_deps() end -- cgit v1.2.3 From 12b1454245fc2efba22d5633f65539dac727ee3d Mon Sep 17 00:00:00 2001 From: Maksim Date: Wed, 10 Jul 2019 05:34:21 +0000 Subject: [#1062] added option to disable send email --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 8f64562ef..f96789d21 100644 --- a/mix.exs +++ b/mix.exs @@ -125,7 +125,7 @@ defmodule Pleroma.Mixfile do {:cors_plug, "~> 1.5"}, {:ex_doc, "~> 0.20.2", only: :dev, runtime: false}, {:web_push_encryption, "~> 0.2.1"}, - {:swoosh, "~> 0.20"}, + {:swoosh, "~> 0.23.2"}, {:gen_smtp, "~> 0.13"}, {:websocket_client, git: "https://github.com/jeremyong/websocket_client.git", only: :test}, {:floki, "~> 0.20.0"}, -- cgit v1.2.3 From fa17879c204980c6fb0025b2e51a978669c441da Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 14 Jul 2019 21:01:32 +0000 Subject: added tests for Web.MediaProxy --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index f96789d21..aa4440351 100644 --- a/mix.exs +++ b/mix.exs @@ -14,7 +14,7 @@ defmodule Pleroma.Mixfile do aliases: aliases(), deps: deps(), test_coverage: [tool: ExCoveralls], - + preferred_cli_env: ["coveralls.html": :test], # Docs name: "Pleroma", homepage_url: "https://pleroma.social/", -- cgit v1.2.3 From d302fcaa6181cb6e2df890b724d871cb86d1e27b Mon Sep 17 00:00:00 2001 From: lain Date: Mon, 15 Jul 2019 16:47:39 +0900 Subject: Dependencies: Update tzdata and related packages. --- mix.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index aa4440351..a26bb6202 100644 --- a/mix.exs +++ b/mix.exs @@ -95,6 +95,7 @@ defmodule Pleroma.Mixfile do defp deps do [ {:phoenix, "~> 1.4.8"}, + {:tzdata, "~> 1.0"}, {:plug_cowboy, "~> 2.0"}, {:phoenix_pubsub, "~> 1.1"}, {:phoenix_ecto, "~> 4.0"}, -- cgit v1.2.3