Merge commit '5694e24bbf9afccbbf1b44d3a405a4e2bc0ff08d' into glitch-soc/merge-upstream
Conflicts: - `.github/workflows/build-nightly.yml`: Upstream changed the environment variables used for defining the version number. This change occurs close to lines that were modified in glitch-soc to account for the different repositories to push to. Ported upstream changes. - `.github/workflows/build-push-pr.yml`: Upstream changed the environment variables used for defining the version number. This change occurs close to lines that were modified in glitch-soc to account for the different repositories to push to. Ported upstream changes. - `lib/mastodon/version.rb`: Upstream changed how the version string is built from environment variables. Adapted the logic to account for the `+glitch` in glitch-soc.
This commit is contained in:
+12
-5
@@ -16,12 +16,16 @@ module Mastodon
|
||||
0
|
||||
end
|
||||
|
||||
def flags
|
||||
ENV['MASTODON_VERSION_FLAGS'].presence || '-beta2'
|
||||
def default_prerelease
|
||||
'beta2'
|
||||
end
|
||||
|
||||
def suffix
|
||||
"+glitch#{ENV.fetch('MASTODON_VERSION_SUFFIX', '')}"
|
||||
def prerelease
|
||||
ENV['MASTODON_VERSION_PRERELEASE'].presence || default_prerelease
|
||||
end
|
||||
|
||||
def build_metadata
|
||||
['glitch', ENV.fetch('MASTODON_VERSION_METADATA', nil)].compact.join('.')
|
||||
end
|
||||
|
||||
def to_a
|
||||
@@ -29,7 +33,10 @@ module Mastodon
|
||||
end
|
||||
|
||||
def to_s
|
||||
[to_a.join('.'), flags, suffix].join
|
||||
components = [to_a.join('.')]
|
||||
components << "-#{prerelease}" if prerelease.present?
|
||||
components << "+#{build_metadata}" if build_metadata.present?
|
||||
components.join
|
||||
end
|
||||
|
||||
def repository
|
||||
|
||||
Reference in New Issue
Block a user