Method: Sentry::ReleaseDetector.detect_release_from_capistrano
- Defined in:
- lib/sentry/release_detector.rb
.detect_release_from_capistrano(project_root) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/sentry/release_detector.rb', line 19 def detect_release_from_capistrano(project_root) revision_file = File.join(project_root, "REVISION") revision_log = File.join(project_root, "..", "revisions.log") if File.exist?(revision_file) File.read(revision_file).strip elsif File.exist?(revision_log) File.open(revision_log).to_a.last.strip.sub(/.*as release ([0-9]+).*/, '\1') end end |