about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorSho Kusano <rosylilly@aduca.org>2019-04-21 11:41:34 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-04-21 04:41:34 +0200
commit3e6c7f3617b99db616142ebcd9f78094d4c6fca3 (patch)
treef412f04b052a9674efd3957ee1a1e2fa8d5f79ad /lib
parent3d70ec470aa99b93e518f7b1e7938687be56748e (diff)
Configrationable repository url (#10600)
* config: Add GITHUB_REPOSITORY for repository name

* config: Add SOURCE_BASE_URL for repository url

* Show source_url and repository name on getting started
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/version.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index b53205ee4..a656031b1 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -33,11 +33,11 @@ module Mastodon
     end
 
     def repository
-      'tootsuite/mastodon'
+      ENV.fetch('GITHUB_REPOSITORY') { 'tootsuite/mastodon' }
     end
 
     def source_base_url
-      "https://github.com/#{repository}"
+      ENV.fetch('SOURCE_BASE_URL') { "https://github.com/#{repository}" }
     end
 
     # specify git tag or commit hash here