grafana-rb 0.1.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ed517cba57d315dc1c5c308982fb5a65740ee67
4
- data.tar.gz: 7a94132f056288a8a5186064f0965101e620d80b
3
+ metadata.gz: c4bc303e3e4122276a06c5e599bd6fcdfb80e1f3
4
+ data.tar.gz: 7ba6b79d50e97404c6765bb4624fa871d5569686
5
5
  SHA512:
6
- metadata.gz: 3136b8aaea01f6163536d8a5a2c40a9f96abdcf05c2bb26c975035762cc707c69c0d746880ea42699ebdaeebb0443d90dfed35139bdcba95082ab24267f96f6a
7
- data.tar.gz: e6de64519725cad0fe4ada2d3eba21a3b7614bfd039681cb9959b155103e6ba6ac34e6daf531f99aeafd1023ac7a1d5341563b14db7e3f8f31b2444f0bc943aa
6
+ metadata.gz: ad62c4d71f040b3b4c34cb7e9702fb63e29e088f739fbb37d6858d7d5decd0869ea3e10dbcf4656e3e3b78e96cfeb60d0026c6b668c88ec542696ae159677bd5
7
+ data.tar.gz: 783bf3b8971f75760acce0656bcc7e9e10a330c13beca8a792246b2b35817daa1cb6523b4b5a071ea6db2eda1a37e2b48acc178904158c6d458e061bae70c854
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## Grafana-rb 0.5.0 (March 6, 2017) ##
2
+
3
+ ## Grafana-rb 0.4.0 (March 6, 2017) ##
4
+
5
+ ## Grafana-rb 0.3.0 (March 6, 2017) ##
6
+
7
+ ## Grafana-rb 0.2.0 (March 6, 2017) ##
8
+
9
+ * Add `bin/release` script.
10
+
1
11
  ## Grafana-rb 0.1.1 (March 6, 2017) ##
2
12
 
3
13
  * Fix gemspec file to publish on rubygems.org (maybe).
data/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  Configure grafana dashboards using simple yml-notation.
4
4
 
5
+ [![Build Status](https://travis-ci.org/uchiru/grafana-rb.svg?branch=master)](https://travis-ci.org/uchiru/grafana-rb)
6
+ [![Gem Version](https://badge.fury.io/rb/grafana-rb.svg)](https://badge.fury.io/rb/grafana-rb)
7
+
5
8
  ## Installation
6
9
 
7
10
  Add this line to your application's Gemfile:
data/bin/release ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ VERSION_PATH = File.expand_path('../../lib/grafana-rb/version.rb', __FILE__)
4
+ CHANGELOG_PATH = File.expand_path('../../CHANGELOG.md', __FILE__)
5
+
6
+ current_version = File.read(VERSION_PATH).split("\n").find { |l| l.index("VERSION") }.split('"')[1]
7
+ major, minor, patch = current_version.split(".", 3).map(&:to_i)
8
+ dev = !!current_version.index("-dev")
9
+
10
+ if ARGV[0] == "patch" && !dev
11
+ version = "#{major}.#{minor}.#{patch + 1}"
12
+ next_version = "#{major}.#{minor}.#{patch + 1}"
13
+
14
+ elsif ARGV[0] == "minor" && dev && patch == 0
15
+ version = "#{major}.#{minor}.0"
16
+ next_version = "#{major}.#{minor + 1}.0-dev"
17
+
18
+ elsif ARGV[0] == "major" && dev && patch == 0
19
+ version = "#{major + 1}.0.0"
20
+ next_version = "#{major + 1}.1.0-dev"
21
+
22
+ else
23
+ puts "Current version: #{current_version}"
24
+ unless dev
25
+ puts "./bin/release patch # => #{major}.#{minor}.#{patch + 1}"
26
+ end
27
+ if dev
28
+ puts "./bin/release minor # => #{major}.#{minor}.0"
29
+ puts "./bin/release major # => #{major + 1}.0.0"
30
+ end
31
+ exit
32
+ end
33
+
34
+ def exec(cmd)
35
+ puts "[exec] #{cmd}"
36
+ system cmd
37
+ end
38
+
39
+ puts "releasing version: #{version}"
40
+ exec %(git add .)
41
+ exec %(git commit -am"uncommitted changes before release #{version}")
42
+ exec %(git pull --rebase)
43
+ File.write(VERSION_PATH, File.read(VERSION_PATH).sub(/VERSION = ".*?"/, %(VERSION = "#{version}")))
44
+ File.write(CHANGELOG_PATH, "## Grafana-rb #{version} (#{Time.now.strftime("%B %-d, %Y")}) ##\n\n" + File.read(CHANGELOG_PATH))
45
+ exec %(git commit -am"Release #{version}")
46
+ exec %(git tag v#{version})
47
+ exec %(git push)
48
+ exec %(git push --tags)
49
+ exec %(gem build grafana-rb.gemspec)
50
+ exec %(gem push grafana-rb-#{version}.gem)
51
+ exec %(rm -f grafana-rb-#{version}.gem)
52
+ File.write(VERSION_PATH, File.read(VERSION_PATH).sub(/VERSION = ".*?"/, %(VERSION = "#{next_version}")))
53
+ exec %(git commit -am"Start version #{next_version}")
54
+ exec %(git push)
55
+
56
+ puts "Done."
@@ -1,3 +1,3 @@
1
1
  module GrafanaRb
2
- VERSION = "0.1.1"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grafana-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Vakhov
@@ -68,6 +68,7 @@ files:
68
68
  - LICENSE.txt
69
69
  - README.md
70
70
  - Rakefile
71
+ - bin/release
71
72
  - exe/grafana-rb
72
73
  - grafana-rb.gemspec
73
74
  - lib/grafana-rb.rb