raykit 0.0.326 → 0.0.330
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/lib/raykit/command.rb +3 -4
- data/lib/raykit/conan/buildinfo.rb +61 -0
- data/lib/raykit/project.rb +7 -2
- data/lib/raykit/tasks.rb +22 -18
- data/lib/raykit.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5df87177ae6182cf93548508e8213225ea1826501baa9809436b86b943cc0786
|
4
|
+
data.tar.gz: 2245eceb90dfdb6f0ac82a5cedf161d131243b757e0e955ff588d4b14aa154ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98691bfb016f9b654af15a9f2186947ead6bb622f0e4d7b7c4cc0baac93400d7f2c7fd15dc0ef1230ee6748b4baf781fe7f633e646188ed8cf3fbe133042c69c
|
7
|
+
data.tar.gz: e1268b77145ab79068f3a1b533322d3b1b70eb8d11bc3468b8932c42365a9da3071a3702e8139a9dbe8522ac90f6773414b1367e8880cfa9ed1ee234b7e5bda6
|
data/lib/raykit/command.rb
CHANGED
@@ -33,7 +33,7 @@ module Raykit
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def initialize(command)
|
36
|
-
|
36
|
+
#def initialize(command, timeout = 0, success_log_level = Logger::DEBUG, logging_enabled = true)
|
37
37
|
timeout = 0
|
38
38
|
success_log_level = nil
|
39
39
|
logging_enabled = false
|
@@ -113,7 +113,6 @@ module Raykit
|
|
113
113
|
self
|
114
114
|
end
|
115
115
|
|
116
|
-
|
117
116
|
def to_log_event
|
118
117
|
secrets = Secrets.new
|
119
118
|
msg = secrets.hide(@command)
|
@@ -197,12 +196,12 @@ module Raykit
|
|
197
196
|
def details
|
198
197
|
if @output.length > 0
|
199
198
|
@output.lines.each do |line|
|
200
|
-
puts
|
199
|
+
puts " " + line
|
201
200
|
end
|
202
201
|
end
|
203
202
|
if @error.length > 0
|
204
203
|
@error.lines.each do |line|
|
205
|
-
puts
|
204
|
+
puts " " + line
|
206
205
|
end
|
207
206
|
end
|
208
207
|
# summary
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Raykit
|
2
|
+
module Conan
|
3
|
+
# Functionality to manage a git commit
|
4
|
+
class BuildInfo < Hash
|
5
|
+
def initialize(filename)
|
6
|
+
current_section=''
|
7
|
+
current_list = Array.new()
|
8
|
+
File.readlines(filename).each do |line|
|
9
|
+
#puts line
|
10
|
+
if(line.index('[') == 0)
|
11
|
+
if(current_section.length > 0)
|
12
|
+
self.store(current_section,current_list)
|
13
|
+
current_list=Array.new()
|
14
|
+
end
|
15
|
+
current_section=line.strip()
|
16
|
+
else
|
17
|
+
item = line.strip()
|
18
|
+
if(item.length > 0)
|
19
|
+
current_list << item
|
20
|
+
end
|
21
|
+
end
|
22
|
+
#
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def section(name)
|
27
|
+
items = Array.new()
|
28
|
+
if(self.has_key?(name))
|
29
|
+
return self[name]
|
30
|
+
end
|
31
|
+
items
|
32
|
+
end
|
33
|
+
|
34
|
+
def pdbs
|
35
|
+
#puts "============================pdbs===================================="
|
36
|
+
items = Array.new()
|
37
|
+
self.section('[builddirs]').each{|dir|
|
38
|
+
#puts dir
|
39
|
+
Dir.glob("#{dir}/**/*.pdb").sort.each{|pdb|
|
40
|
+
puts pdb
|
41
|
+
items << pdb
|
42
|
+
}
|
43
|
+
#Dir.glob("#{lib_dir}/raykit/**/*.rb").sort.each { |file| require file }
|
44
|
+
}
|
45
|
+
#puts "============================pdbs===================================="
|
46
|
+
items
|
47
|
+
end
|
48
|
+
|
49
|
+
def copy_pdbs(dir)
|
50
|
+
self.pdbs.each{|pdb|
|
51
|
+
target="#{dir}/#{File.basename(pdb)}"
|
52
|
+
if(!File.exists?(target))
|
53
|
+
puts " copying #{pdb} to #{target}"
|
54
|
+
FileUtils.cp(pdb,"#{dir}/#{target}")
|
55
|
+
end
|
56
|
+
}
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
data/lib/raykit/project.rb
CHANGED
@@ -97,6 +97,11 @@ module Raykit
|
|
97
97
|
outstanding_commit? || !`git log -n 1`.include?("tag:")
|
98
98
|
end
|
99
99
|
|
100
|
+
def read_only?
|
101
|
+
return true if !File.exists?(".git")
|
102
|
+
return false
|
103
|
+
end
|
104
|
+
|
100
105
|
def detached?
|
101
106
|
return true if @git_directory.nil?
|
102
107
|
@git_directory.detached?
|
@@ -216,7 +221,7 @@ module Raykit
|
|
216
221
|
end
|
217
222
|
|
218
223
|
def commit(commit_message)
|
219
|
-
warn "[DEPRECATION] 'commit_message_filename' is
|
224
|
+
warn "[DEPRECATION] 'commit_message_filename' is deprecated. Use a run command for better transparency."
|
220
225
|
Dir.chdir(@directory) do
|
221
226
|
if File.exist?(".gitignore")
|
222
227
|
status = `git status`
|
@@ -279,7 +284,7 @@ module Raykit
|
|
279
284
|
|
280
285
|
def run(command, quit_on_failure = true)
|
281
286
|
if command.is_a?(Array)
|
282
|
-
command.each { |subcommand| run(subcommand, quit_on_failure) }
|
287
|
+
command.each { |subcommand| run(subcommand, quit_on_failure, success_log_level) }
|
283
288
|
else
|
284
289
|
cmd = Command.new(command).set_timeout(0).run
|
285
290
|
cmd.summary
|
data/lib/raykit/tasks.rb
CHANGED
@@ -9,27 +9,31 @@ desc "integrate changes into the git repository"
|
|
9
9
|
task :integrate do
|
10
10
|
puts Rainbow(": integrate").blue.bright
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
puts "detached head state, skipping integrate operations"
|
12
|
+
if PROJECT.read_only?
|
13
|
+
puts " read only state, skipping integrate operations"
|
15
14
|
else
|
16
|
-
|
17
|
-
|
15
|
+
git_dir = Raykit::Git::Directory.new(Rake.application.original_dir)
|
16
|
+
if git_dir.detached?
|
17
|
+
puts " detached head state, skipping integrate operations"
|
18
18
|
else
|
19
|
-
|
20
|
-
|
19
|
+
if PROJECT.outstanding_commit?
|
20
|
+
Rake::Task["test"].invoke if Rake::Task.task_defined?("test")
|
21
|
+
else
|
22
|
+
puts " no outstanding commits detected"
|
23
|
+
end
|
21
24
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
25
|
+
if !File.exist?(".gitignore")
|
26
|
+
puts "warning: .gitignore does not exist."
|
27
|
+
else
|
28
|
+
PROJECT.run("git add --all")
|
29
|
+
unless `git status`.include?("nothing to commit")
|
30
|
+
# if(PROJECT.outstanding_commit?)
|
31
|
+
commit_message = "integrate"
|
32
|
+
PROJECT.run("git commit -m\"#{commit_message}\"") if PROJECT.outstanding_commit?
|
33
|
+
PROJECT.run("git pull")
|
34
|
+
# PROJECT.run("git push")
|
35
|
+
# PROJECT.run("git push --tags")
|
36
|
+
end
|
33
37
|
end
|
34
38
|
end
|
35
39
|
end
|
data/lib/raykit.rb
CHANGED
@@ -14,4 +14,4 @@ SECRETS = Raykit::Secrets.new
|
|
14
14
|
# TIMER=Raykit::Timer.new
|
15
15
|
|
16
16
|
REPOSITORIES = Raykit::Git::Repositories.new("#{Raykit::Environment.get_dev_dir("log")}/Raykit.Git.Repositories.json")
|
17
|
-
GIT_DIRECTORY = Raykit::Git::Directory.new(Rake.application.original_dir) if Dir.exist?(".git")
|
17
|
+
GIT_DIRECTORY = Raykit::Git::Directory.new(Rake.application.original_dir) # if Dir.exist?(".git")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raykit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.330
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- bin/raykit
|
79
79
|
- lib/raykit.rb
|
80
80
|
- lib/raykit/command.rb
|
81
|
+
- lib/raykit/conan/buildinfo.rb
|
81
82
|
- lib/raykit/console.rb
|
82
83
|
- lib/raykit/dir.rb
|
83
84
|
- lib/raykit/dotnet.rb
|
@@ -124,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
125
|
- !ruby/object:Gem::Version
|
125
126
|
version: '0'
|
126
127
|
requirements: []
|
127
|
-
rubygems_version: 3.2.
|
128
|
+
rubygems_version: 3.2.15
|
128
129
|
signing_key:
|
129
130
|
specification_version: 4
|
130
131
|
summary: ruby gem to support rake ci/cd tasks
|