Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-10-01 16:59:44 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-10-02 17:11:32 +0300
commitb09e40624b9fc6a7b4a7b38f174bc66d996e3fd5 (patch)
tree5bbe4e8da4966bbdbc30e6ab7bcfa50caff1c29b /spec/support/stub_version.rb
parentdf73116f75d4a7545fb4a7684aa76624efede7d0 (diff)
Show the commit-sha for pre-release versions
The pre-release tags are set at the beginning of a release, so it would be impossible to figure out which version was running if we're running nightlies. In that case it's better to still link to the SHA. These versions don't get deployed to .com.
Diffstat (limited to 'spec/support/stub_version.rb')
-rw-r--r--spec/support/stub_version.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/stub_version.rb b/spec/support/stub_version.rb
new file mode 100644
index 00000000000..594ab64e7c6
--- /dev/null
+++ b/spec/support/stub_version.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module StubVersion
+ def stub_version(version, revision)
+ stub_const('Gitlab::VERSION', version)
+ allow(Gitlab).to receive(:revision).and_return(revision)
+ end
+end