Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / helpers / version_helper.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 module VersionHelper
6   # Get the source_version given in the API server's discovery
7   # document.
8   def api_source_version
9     arvados_api_client.discovery[:source_version]
10   end
11
12   # Get the packageVersion given in the API server's discovery
13   # document.
14   def api_package_version
15     arvados_api_client.discovery[:packageVersion]
16   end
17
18   # URL for browsing source code for the given version.
19   def version_link_target version
20     "https://arvados.org/projects/arvados/repository/changes?rev=#{version.sub(/-.*/, "")}"
21   end
22 end