algoliasearch-jekyll 0.5.1 → 0.5.2
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.
- checksums.yaml +4 -4
- data/algoliasearch-jekyll.gemspec +3 -2
- data/lib/version.rb +1 -6
- data/scripts/bump_version +47 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 070750a5b303f2b76e2b770acbd21c02f77a304e
|
4
|
+
data.tar.gz: 128b7107d03baee293780d9cd53ca1890ecdb143
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e730a8bbc0814c2f8b37d746c57ec391f91f2be32402039ccd6dc47b0b7bdb94b3731c2e08ce3df0707c3b194b414afffc2d6fd70e0f56793c2f68b9081b5bc
|
7
|
+
data.tar.gz: 0bccada9786e7e7c1a2a4878b6e2ee28458a28db3a47d21208cb811c1f1036b79cd1ebd29e4c82409284b89dc6b6ff56f665b2f08105aa86ac1676795bebab85
|
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: algoliasearch-jekyll 0.5.
|
5
|
+
# stub: algoliasearch-jekyll 0.5.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "algoliasearch-jekyll"
|
9
|
-
s.version = "0.5.
|
9
|
+
s.version = "0.5.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -36,6 +36,7 @@ Gem::Specification.new do |s|
|
|
36
36
|
"lib/push.rb",
|
37
37
|
"lib/record_extractor.rb",
|
38
38
|
"lib/version.rb",
|
39
|
+
"scripts/bump_version",
|
39
40
|
"scripts/check_flay",
|
40
41
|
"scripts/check_flog",
|
41
42
|
"scripts/git_hooks/pre-commit",
|
data/lib/version.rb
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require_relative '../lib/version.rb'
|
3
|
+
|
4
|
+
class BumpVersion
|
5
|
+
def initialize(*args)
|
6
|
+
@type = args[0]
|
7
|
+
if !valid_type?(@type)
|
8
|
+
puts "Invalid bump type: #{@type}"
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def valid_type?(type)
|
14
|
+
%w(major minor patch).include?(type)
|
15
|
+
end
|
16
|
+
|
17
|
+
def bump(current_version, type)
|
18
|
+
major, minor, patch = current_version.split('.').map(&:to_i)
|
19
|
+
if type == 'major'
|
20
|
+
major += 1
|
21
|
+
minor = 0
|
22
|
+
patch = 0
|
23
|
+
end
|
24
|
+
if type == 'minor'
|
25
|
+
minor += 1
|
26
|
+
patch = 0
|
27
|
+
end
|
28
|
+
patch += 1 if type == 'patch'
|
29
|
+
"#{major}.#{minor}.#{patch}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def run
|
33
|
+
old_version = AlgoliaSearchJekyllVersion.to_s
|
34
|
+
new_version = bump(old_version, @type)
|
35
|
+
|
36
|
+
script_dir = File.expand_path(File.dirname(__FILE__))
|
37
|
+
file = File.join(script_dir, '../lib/version.rb')
|
38
|
+
old_content = File.read(file)
|
39
|
+
new_content = old_content.gsub(old_version, new_version)
|
40
|
+
File.write(file, new_content)
|
41
|
+
|
42
|
+
`git add #{file}`
|
43
|
+
`git commit -m "chore(bump): Version bump to #{new_version}"`
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
BumpVersion.new(*ARGV).run
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algoliasearch-jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Carry
|
@@ -218,6 +218,7 @@ files:
|
|
218
218
|
- lib/push.rb
|
219
219
|
- lib/record_extractor.rb
|
220
220
|
- lib/version.rb
|
221
|
+
- scripts/bump_version
|
221
222
|
- scripts/check_flay
|
222
223
|
- scripts/check_flog
|
223
224
|
- scripts/git_hooks/pre-commit
|