domotics-arduino 0.0.07 → 0.0.08

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.
Files changed (3) hide show
  1. data/Rakefile +15 -14
  2. data/lib/domotics/arduino/version.rb +1 -1
  3. metadata +1 -1
data/Rakefile CHANGED
@@ -14,20 +14,21 @@ MAJOR = 0
14
14
 
15
15
  desc "Commit patch and release gem"
16
16
  task :patch do
17
+ update { |sv,i| i == PATCH ? sv.succ : sv }
18
+ end
19
+
20
+ def update
21
+ # Update version
22
+ File.open "lib/domotics/arduino/version.rb", "r+" do |f|
23
+ up = f.read.sub(/\d+.\d+.\d+/){ |ver| ver.split('.').map.with_index{ |sv, i| yield sv,i }.join('.') }
24
+ f.seek 0
25
+ f.write up
26
+ end
17
27
  # add new files to repo
18
28
  %x(git add --all .)
19
- # commit if anything changes
20
- unless %x(git commit -a --reuse-message=HEAD) =~ /nothing to commit/
21
- # Update version
22
- File.open "lib/domotics/arduino/version.rb", "r+" do |f|
23
- up = f.read.sub(/\d+.\d+.\d+/){ |ver| ver.split('.').map.with_index{ |sv, i| i == PATCH ? sv.succ : sv }.join('.') }
24
- f.seek 0
25
- #f.write up
26
- end
27
- # release
28
- Rake::Task[:release].reenable
29
- Rake::Task[:release].invoke
30
- else
31
- puts "No changes"
32
- end
29
+ # commit
30
+ %x(git commit -a --reuse-message=HEAD) =~ /nothing to commit/
31
+ # release
32
+ Rake::Task[:release].reenable
33
+ Rake::Task[:release].invoke
33
34
  end
@@ -1,5 +1,5 @@
1
1
  module Domotics
2
2
  module Arduino
3
- VERSION = "0.0.07"
3
+ VERSION = "0.0.08"
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.07
4
+ version: 0.0.08
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: