Skip to content

Commit

Permalink
Add kmyblue version label
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Sep 10, 2023
1 parent 99fb562 commit d75a17d
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion lib/mastodon/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ module Mastodon
module Version
module_function

def kmyblue_major
1
end

def kmyblue_minor
0
end

def major
4
end
Expand All @@ -24,8 +32,17 @@ def prerelease
ENV['MASTODON_VERSION_PRERELEASE'].presence || default_prerelease
end

def to_a_of_kmyblue
[kmyblue_major, kmyblue_minor].compact
end

def to_s_of_kmyblue
components = [to_a_of_kmyblue.join('.')]
components.join
end

def build_metadata
ENV.fetch('MASTODON_VERSION_METADATA', nil)
['kmyblue', to_s_of_kmyblue, ENV.fetch('MASTODON_VERSION_METADATA', nil)].compact.join('.')
end

def to_a
Expand Down

0 comments on commit d75a17d

Please sign in to comment.