mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 22:34:47 +00:00
23 lines
333 B
Ruby
23 lines
333 B
Ruby
module Sure
|
|
class << self
|
|
def version
|
|
Semver.new(semver)
|
|
end
|
|
|
|
def commit_sha
|
|
if Rails.env.production?
|
|
ENV["BUILD_COMMIT_SHA"]
|
|
else
|
|
`git rev-parse HEAD`.chomp
|
|
end
|
|
rescue Errno::ENOENT
|
|
nil
|
|
end
|
|
|
|
private
|
|
def semver
|
|
"0.6.9-alpha.5"
|
|
end
|
|
end
|
|
end
|