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

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2023-01-20 23:07:34 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2023-01-20 23:07:34 +0300
commit3a62c8c59da6a892a661325d48424595f15d602c (patch)
tree6e431d7830d7d2ef0fef47f71a3fa4d65fa050d3 /Rules
parentf44e552801fe0af6ccba9c11a9ee5280ffb98e53 (diff)
Fix check for current stable version
Diffstat (limited to 'Rules')
-rw-r--r--Rules8
1 files changed, 8 insertions, 0 deletions
diff --git a/Rules b/Rules
index da252b0a..c6c1d597 100644
--- a/Rules
+++ b/Rules
@@ -53,6 +53,14 @@ preprocess do
config[:algolia] = ENV['ALGOLIA_SEARCH'] || 'true'
+ def get_online_versions
+ uri = URI('https://docs.gitlab.com/versions.json')
+ response = Net::HTTP.get(uri)
+ parsed = JSON.parse(response, symbolize_names: true)
+ parsed[0]
+ end
+ config[:online_versions] = get_online_versions
+
end
compile '/404.*' do