domotics-arduino 0.0.09 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -13,11 +13,16 @@ MINOR = 1
13
13
  MAJOR = 0
14
14
 
15
15
  desc "Commit patch and release gem"
16
- task :patch do
16
+ task :patch, :commit_message do |t, args|
17
+ update(args[:commit_message]){ |sv,i| i == PATCH ? sv.succ : sv }
18
+ end
19
+
20
+ desc "Commit minor update and release gem"
21
+ task :minor do
17
22
  update { |sv,i| i == PATCH ? sv.succ : sv }
18
23
  end
19
24
 
20
- def update
25
+ def update(msg)
21
26
  # Update version
22
27
  File.open "lib/domotics/arduino/version.rb", "r+" do |f|
23
28
  up = f.read.sub(/\d+.\d+.\d+/){ |ver| ver.split('.').map.with_index{ |sv, i| yield sv,i }.join('.') }
@@ -27,7 +32,9 @@ def update
27
32
  # add new files to repo
28
33
  %x(git add --all .)
29
34
  # commit
30
- %x(git commit -a --reuse-message=HEAD) =~ /nothing to commit/
35
+ if msg then %x(git commit -a -m "#{msg}")
36
+ else %x(git commit -a --reuse-message=HEAD)
37
+ end
31
38
  # release
32
39
  Rake::Task[:release].reenable
33
40
  Rake::Task[:release].invoke
@@ -1,5 +1,5 @@
1
1
  module Domotics
2
2
  module Arduino
3
- VERSION = "0.0.09"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: domotics-arduino
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.09
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: