Skip to content
Snippets Groups Projects
Commit fe71abc8 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Read from the version file and set the version accordingly.

parent 5a753d47
No related branches found
No related tags found
1 merge request!605Component versions
2.6.9.pre
8.3.0.pre
0.4.3.pre
Loading
Loading
@@ -15,9 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
version = Gitlab::Version.new("GITLAB_VERSION")
 
name "gitlab-rails"
default_version "master" # Nightly build
default_version "v#{version}"
 
EE = system("#{Omnibus::Config.project_root}/support/is_gitlab_ee.sh")
 
Loading
Loading
Loading
Loading
@@ -15,9 +15,10 @@
## limitations under the License.
##
#
version = Gitlab::Version.new("GITLAB_SHELL_VERSION")
 
name "gitlab-shell"
default_version "master" # Nightly build
default_version "v#{version}"
 
dependency "ruby"
dependency "rsync"
Loading
Loading
Loading
Loading
@@ -14,9 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
version = Gitlab::Version.new("GITLAB_WORKHORSE_VERSION")
 
name "gitlab-workhorse"
default_version "master" # Nightly build
default_version version
 
source :git => "git@dev.gitlab.org:gitlab/gitlab-workhorse.git"
 
Loading
Loading
module Gitlab
class Version
def initialize(filename)
filepath = File.expand_path(filename, Omnibus::Config.project_root)
@read_version = File.read(filepath).chomp
rescue Errno::ENOENT
# Didn't find the file
@read_version = ""
end
def version
if @read_version.include?('.pre')
"master"
elsif @read_version.empty?
nil
else
@read_version
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment