Skip to content

Commit

Permalink
Fix: バージョン表記の末尾にドットがつく場合がある問題
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Nov 6, 2024
1 parent e212901 commit fb4a8df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mastodon/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ def to_s_of_kmyblue
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
['kmyblue', to_s_of_kmyblue, build_metadata_of_mastodon].compact.join('.')
['kmyblue', to_s_of_kmyblue].compact.join('.')
end

def build_metadata_of_mastodon
Expand All @@ -75,6 +74,7 @@ def to_s
components = [to_a.join('.')]
components << "-#{prerelease}" if prerelease.present?
components << "+#{build_metadata}" if build_metadata.present?
components << "+#{build_metadata_of_mastodon}" if build_metadata_of_mastodon.present?
components.join
end

Expand Down

0 comments on commit fb4a8df

Please sign in to comment.