Class: Project

Inherits:
Object
  • Object
show all
Defined in:
lib/mark_version/project.rb

Class Method Summary collapse

Class Method Details

.commit_and_tagObject



52
53
54
55
56
# File 'lib/mark_version/project.rb', line 52

def self.commit_and_tag
  Git.commit(VersionFile.new.version)
  Git.tag(VersionFile.new.version)
  Git.push if MarkVersionConfig.new.auto_push?
end

.dev_versionObject



48
49
50
# File 'lib/mark_version/project.rb', line 48

def self.dev_version
  VersionFile.new.dev_version
end

.increment_release_candidateObject



34
35
36
37
# File 'lib/mark_version/project.rb', line 34

def self.increment_release_candidate
  VersionFile.new.increment_release_candidate
  commit_and_tag
end

.initObject



2
3
4
5
6
7
# File 'lib/mark_version/project.rb', line 2

def self.init
  Dir.mkdir('.mark_version')
  VersionFile.new.init
  MarkVersionConfig.new.init
  commit_and_tag
end

.majorObject



19
20
21
22
# File 'lib/mark_version/project.rb', line 19

def self.major
  VersionFile.new.major
  commit_and_tag
end

.major_release_candidateObject



29
30
31
32
# File 'lib/mark_version/project.rb', line 29

def self.major_release_candidate
  VersionFile.new.major_release_candidate
  commit_and_tag
end

.minorObject



14
15
16
17
# File 'lib/mark_version/project.rb', line 14

def self.minor
  VersionFile.new.minor
  commit_and_tag
end

.minor_release_candidateObject



24
25
26
27
# File 'lib/mark_version/project.rb', line 24

def self.minor_release_candidate
  VersionFile.new.minor_release_candidate
  commit_and_tag
end

.patchObject



9
10
11
12
# File 'lib/mark_version/project.rb', line 9

def self.patch
  VersionFile.new.patch
  commit_and_tag
end

.releaseObject



39
40
41
42
# File 'lib/mark_version/project.rb', line 39

def self.release
  VersionFile.new.release
  commit_and_tag
end

.versionObject



44
45
46
# File 'lib/mark_version/project.rb', line 44

def self.version
  VersionFile.new.version
end