Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:darix:apps
discourse
dump-version-info.rb
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dump-version-info.rb of Package discourse
#!/usr/bin/ruby # vim: set sw=2 sts=2 et tw=80 : require 'date' # 1.9.0.beta6~git14.d29fc781fb -> v1.9.0.beta6-14-gd29fc781fb # # echo "\$git_version = '$rev'" >> config/version.rb # echo "\$git_branch = 'master'" >> config/version.rb # echo "\$full_version = '$fullversion'" >> config/version.rb # version_string=ARGV.first || '2.4.0~beta10+git0.cca654fc1a' ver_re=/\A(?<ver>[^\+]+)[\+]git(?<gitrev>\d+)\.(?<githash>.*)\z/ m=ver_re.match(version_string) File.open('config/version.rb', 'w') do |f| f ||=STDOUT f.puts "# DO NOT TOUCH THIS FILE IS AUTOGENERATED DURING BUILD" f.puts "\$git_version = '#{m[:githash]}'" # f.puts "\$git_branch = 'tests-passed'" f.puts "\$git_branch = 'stable'" f.puts "\$full_version = 'v#{m[:ver]}-#{m[:gitrev]}-#{m[:githash]}'" f.puts "\$last_commit_date = DateTime.strptime('#{ENV['SOURCE_DATE_EPOCH']}', '%s')" end
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor