Change: NodeInfoのバージョン表記
This commit is contained in:
parent
3e4bd83326
commit
aa5e50e5d5
2 changed files with 17 additions and 2 deletions
|
@ -11,7 +11,7 @@ class NodeInfo::Serializer < ActiveModel::Serializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def software
|
def software
|
||||||
{ name: 'mastodon', version: Mastodon::Version.to_s }
|
{ name: 'kmyblue', version: Mastodon::Version.to_s }
|
||||||
end
|
end
|
||||||
|
|
||||||
def services
|
def services
|
||||||
|
@ -41,6 +41,10 @@ class NodeInfo::Serializer < ActiveModel::Serializer
|
||||||
def metadata
|
def metadata
|
||||||
{
|
{
|
||||||
features: fedibird_capabilities,
|
features: fedibird_capabilities,
|
||||||
|
upstream: {
|
||||||
|
name: 'Mastodon',
|
||||||
|
version: Mastodon::Version.to_s_of_mastodon,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,19 @@ module Mastodon
|
||||||
components.join
|
components.join
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def to_s_of_mastodon
|
||||||
|
components = [to_a.join('.')]
|
||||||
|
components << "-#{prerelease}" if prerelease.present?
|
||||||
|
components << "+#{build_metadata_of_mastodon}" if build_metadata_of_mastodon.present?
|
||||||
|
components.join
|
||||||
|
end
|
||||||
|
|
||||||
def build_metadata
|
def build_metadata
|
||||||
['kmyblue', to_s_of_kmyblue, ENV.fetch('MASTODON_VERSION_METADATA', nil)].compact.join('.')
|
['kmyblue', to_s_of_kmyblue, build_metadata_of_mastodon].compact.join('.')
|
||||||
|
end
|
||||||
|
|
||||||
|
def build_metadata_of_mastodon
|
||||||
|
ENV.fetch('MASTODON_VERSION_METADATA', nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_a
|
def to_a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue