Module: Andrake::Manifest::Version

Included in:
Andrake::Manifest
Defined in:
lib/andrake/manifest/version.rb

Instance Method Summary collapse

Instance Method Details

#bump_majorObject



6
7
8
9
10
11
12
# File 'lib/andrake/manifest/version.rb', line 6

def bump_major
  self.version_major += 1
  self.version_minor = 0
  self.version_patch = 0
  self.version_code += 1
  self
end

#bump_minorObject



14
15
16
17
18
19
# File 'lib/andrake/manifest/version.rb', line 14

def bump_minor
  self.version_minor += 1
  self.version_patch = 0
  self.version_code += 1
  self
end

#bump_patchObject



21
22
23
24
25
# File 'lib/andrake/manifest/version.rb', line 21

def bump_patch
  self.version_patch += 1
  self.version_code += 1
  self
end

#update_versionObject



27
28
29
30
31
# File 'lib/andrake/manifest/version.rb', line 27

def update_version
  manifest["android:versionName"] = version.to_s
  manifest["android:versionCode"] = version_code.to_s
  self
end

#versionObject



2
3
4
# File 'lib/andrake/manifest/version.rb', line 2

def version
  [version_major, version_minor, version_patch].join(".")
end