Class: Debian::Versions::Development
Constant Summary
MSPRelease::Helpers::PROJECT_FILE
Class Method Summary
collapse
Instance Method Summary
collapse
author, changelog, data, data=, data_exists?, fail_if_modified_wc, fail_if_push_pending, git_version, load_data, msp_version, on_release_branch?, remove_data, save_data, time, time_rfc, timestamp
Methods inherited from Base
new_from_string, new_if_matches
Constructor Details
#initialize(timestamp, hash, branch_name) ⇒ Development
96
97
98
99
100
|
# File 'lib/msp_release/debian.rb', line 96
def initialize(timestamp, hash, branch_name)
@timestamp = timestamp
@hash = hash
@branch_name = branch_name
end
|
Class Method Details
.new_from_working_directory(branch_name, commit_hash) ⇒ Object
90
91
92
93
|
# File 'lib/msp_release/debian.rb', line 90
def new_from_working_directory(branch_name, commit_hash)
safe_branch_name = branch_name.gsub(/[^a-z0-9]/i, ".")
new(timestamp, commit_hash[0...6], safe_branch_name)
end
|
.pattern ⇒ Object
86
87
88
|
# File 'lib/msp_release/debian.rb', line 86
def pattern
/^([0-9]+)-git\+([a-f0-9]+)~([a-z0-9\+\.]+)$/
end
|
Instance Method Details
#bump ⇒ Object
106
107
108
|
# File 'lib/msp_release/debian.rb', line 106
def bump
Stable.new(@major, @minor, @bugfix, "1")
end
|
#to_s ⇒ Object
102
103
104
|
# File 'lib/msp_release/debian.rb', line 102
def to_s
"#{@timestamp}-git+#{@hash}~#{@branch_name}"
end
|