Fix Rebased --> Pleroma instance version

This commit is contained in:
Alex Gleason 2022-08-25 14:02:38 -05:00
parent 6c87e7f16e
commit a4c9739965
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
4 changed files with 8 additions and 4 deletions

View file

@ -12,6 +12,7 @@ defmodule Pleroma.Application do
require Logger require Logger
@name Mix.Project.config()[:name] @name Mix.Project.config()[:name]
@compat_name Mix.Project.config()[:compat_name]
@version Mix.Project.config()[:version] @version Mix.Project.config()[:version]
@repository Mix.Project.config()[:source_url] @repository Mix.Project.config()[:source_url]
@mix_env Mix.env() @mix_env Mix.env()
@ -19,6 +20,7 @@ defmodule Pleroma.Application do
def name, do: @name def name, do: @name
def version, do: @version def version, do: @version
def named_version, do: @name <> " " <> @version def named_version, do: @name <> " " <> @version
def compat_version, do: @compat_name <> " " <> @version
def repository, do: @repository def repository, do: @repository
def user_agent do def user_agent do

View file

@ -18,7 +18,7 @@ def render("show.json", _) do
title: Keyword.get(instance, :name), title: Keyword.get(instance, :name),
description: Keyword.get(instance, :description), description: Keyword.get(instance, :description),
short_description: Keyword.get(instance, :short_description), short_description: Keyword.get(instance, :short_description),
version: "#{@mastodon_api_level} (compatible; #{Pleroma.Application.named_version()})", version: "#{@mastodon_api_level} (compatible; #{Pleroma.Application.compat_version()})",
email: Keyword.get(instance, :email), email: Keyword.get(instance, :email),
urls: %{ urls: %{
streaming_api: Pleroma.Web.Endpoint.websocket_url() streaming_api: Pleroma.Web.Endpoint.websocket_url()

View file

@ -6,6 +6,8 @@ defmodule Pleroma.Mixfile do
def project do def project do
[ [
app: :pleroma, app: :pleroma,
name: "Rebased",
compat_name: "Pleroma",
version: version("2.4.52"), version: version("2.4.52"),
elixir: "~> 1.9", elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
@ -18,12 +20,11 @@ def project do
test_coverage: [tool: ExCoveralls], test_coverage: [tool: ExCoveralls],
preferred_cli_env: ["coveralls.html": :test], preferred_cli_env: ["coveralls.html": :test],
# Docs # Docs
name: "Rebased",
homepage_url: "https://soapbox.pub/", homepage_url: "https://soapbox.pub/",
source_url: "https://gitlab.com/soapbox-pub/soapbox-be", source_url: "https://gitlab.com/soapbox-pub/rebased",
docs: [ docs: [
source_url_pattern: source_url_pattern:
"https://gitlab.com/soapbox-pub/soapbox-be/blob/develop/%{path}#L%{line}", "https://gitlab.com/soapbox-pub/rebased/blob/develop/%{path}#L%{line}",
logo: "priv/static/images/logo.png", logo: "priv/static/images/logo.png",
extras: ["README.md", "CHANGELOG.md"] ++ Path.wildcard("docs/**/*.md"), extras: ["README.md", "CHANGELOG.md"] ++ Path.wildcard("docs/**/*.md"),
groups_for_extras: [ groups_for_extras: [

View file

@ -47,6 +47,7 @@ test "get instance information", %{conn: conn} do
"rules" => _ "rules" => _
} = result } = result
assert result["version"] =~ "Pleroma"
assert result["pleroma"]["metadata"]["account_activation_required"] != nil assert result["pleroma"]["metadata"]["account_activation_required"] != nil
assert result["pleroma"]["metadata"]["features"] assert result["pleroma"]["metadata"]["features"]
assert result["pleroma"]["metadata"]["federation"] assert result["pleroma"]["metadata"]["federation"]