freshli-commons 0.6.7 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +62 -35
- data/lib/corgibytes/freshli/commons/version.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed4130177375f38b13b4c684a54d8b171b4ea6f48b67efd493636bf8770ffd74
|
4
|
+
data.tar.gz: dfab40ebf656be66b4c0a1d5ffc8d09e7f0b910f028a7745758a3aac81573b71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b59266efc08a92611c0fd8fdae19499acfe97c4dc91247d91036d412249432bc2ba520a0ec6ba28ed3ad0ed13130b6fb6fa27f37851b00cd7f17be6911eb75d8
|
7
|
+
data.tar.gz: 504b854746f684fe79a97a776be54e6691a8dfc0b6d1852b323d1557e2ada188b2e21051d86deacac69e2597b178a2d88d960b259dfa628a2415d4f0f70d60eb
|
data/Rakefile
CHANGED
@@ -1,10 +1,43 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'git-version-bump'
|
4
|
+
|
5
|
+
def version_file
|
6
|
+
File.expand_path(File.join(File.dirname(__FILE__), 'lib', 'corgibytes', 'freshli', 'commons', 'version.rb'))
|
7
|
+
end
|
8
|
+
|
9
|
+
def version_file_contents
|
10
|
+
<<~VERSION_FILE
|
11
|
+
# frozen_string_literal: true
|
12
|
+
|
13
|
+
module Corgibytes
|
14
|
+
module Freshli
|
15
|
+
module Commons
|
16
|
+
VERSION = '#{GVB.version}'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
VERSION_FILE
|
21
|
+
end
|
22
|
+
|
23
|
+
def write_version
|
24
|
+
File.write(version_file, version_file_contents)
|
25
|
+
load_version
|
26
|
+
end
|
27
|
+
|
28
|
+
def load_version
|
29
|
+
return if require_relative version_file
|
30
|
+
|
31
|
+
# forcefully reload version file if it was already loaded
|
32
|
+
Corgibytes::Freshli::Commons.send(:remove_const, :VERSION)
|
33
|
+
load(version_file)
|
34
|
+
end
|
35
|
+
|
36
|
+
write_version
|
37
|
+
|
3
38
|
require 'bundler/gem_tasks'
|
4
39
|
require 'rspec/core/rake_task'
|
5
40
|
|
6
|
-
require 'git-version-bump'
|
7
|
-
|
8
41
|
require 'fileutils'
|
9
42
|
|
10
43
|
# TODO: Copy the `freshli_agent.proto` from the `corgibytes/freshli` repository
|
@@ -75,22 +108,16 @@ RuboCop::RakeTask.new
|
|
75
108
|
namespace :version do
|
76
109
|
desc "Persist the the current version number as #{GVB.version}"
|
77
110
|
task :persist do
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
VERSION = '#{GVB.version}'
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
VERSION_FILE
|
88
|
-
File.write(version_file, version_file_contents)
|
111
|
+
write_version
|
112
|
+
end
|
113
|
+
|
114
|
+
task :show do
|
115
|
+
puts "Current version #{Corgibytes::Freshli::Commons::VERSION}"
|
89
116
|
end
|
90
117
|
end
|
91
118
|
|
92
119
|
# Ensure that the grpc files are generated before the build runs
|
93
|
-
Rake::Task['build'].enhance(['grpc', 'version:
|
120
|
+
Rake::Task['build'].enhance(['grpc', 'version:show'])
|
94
121
|
|
95
122
|
task default: %i[grpc spec rubocop]
|
96
123
|
|
@@ -98,31 +125,31 @@ task default: %i[grpc spec rubocop]
|
|
98
125
|
# to avoid an issue that was causing the version number of the `git-version-bump` gem to be used instead
|
99
126
|
# of this gem's version. That's because of how the `GVB.version` method determines the calling file.
|
100
127
|
namespace :version do
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
128
|
+
namespace :bump do
|
129
|
+
desc 'bump major version (x.y.z -> x+1.0.0)'
|
130
|
+
task :major do
|
131
|
+
GVB.tag_version "#{GVB.major_version + 1}.0.0"
|
105
132
|
|
106
|
-
|
107
|
-
|
133
|
+
puts "Version is now #{GVB.version}"
|
134
|
+
end
|
108
135
|
|
109
|
-
|
110
|
-
|
111
|
-
|
136
|
+
desc 'bump minor version (x.y.z -> x.y+1.0)'
|
137
|
+
task :minor do
|
138
|
+
GVB.tag_version "#{GVB.major_version}.#{GVB.minor_version + 1}.0"
|
112
139
|
|
113
|
-
|
114
|
-
|
140
|
+
puts "Version is now #{GVB.version}"
|
141
|
+
end
|
115
142
|
|
116
|
-
desc
|
117
|
-
|
118
|
-
|
143
|
+
desc 'bump patch version (x.y.z -> x.y.z+1)'
|
144
|
+
task :patch do
|
145
|
+
GVB.tag_version "#{GVB.major_version}.#{GVB.minor_version}.#{GVB.patch_version + 1}"
|
119
146
|
|
120
|
-
|
121
|
-
|
147
|
+
puts "Version is now #{GVB.version}"
|
148
|
+
end
|
122
149
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
150
|
+
desc 'Print current version'
|
151
|
+
task :show do
|
152
|
+
puts GVB.version
|
153
|
+
end
|
154
|
+
end
|
128
155
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freshli-commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Scott Ford
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aruba
|