raykit 0.0.465 → 0.0.466
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raykit/command.rb +1 -2
- data/lib/raykit/console.rb +1 -1
- data/lib/raykit/git/directory.rb +1 -2
- data/lib/raykit/tasks.rb +4 -12
- data/lib/raykit/zip.rb +0 -9
- data/lib/raykit.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 942345ca52e601d5f8dbfcda26b00bade6d9cb72478383235a49126ba1a1cc1b
|
4
|
+
data.tar.gz: 0f14932e0f8874a31d8529b492c76b061c074384abbccafb7b33a247d934b29a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3304c19948ff50fc429783861075fcec3c3a4250f005888ca858e5f24650558c3df233ff7138ebfab287cd862d7abf7eba27ce355acc343f4ce6a133541fc21
|
7
|
+
data.tar.gz: 860093f35b84ae8c84fdb4593804360a36d952099626bc998271a297a41330254f4fa6b8fca8e426f0bee888855f28b9a24e5a3d665504f7c2dc8a7be39adf22
|
data/lib/raykit/command.rb
CHANGED
data/lib/raykit/console.rb
CHANGED
@@ -264,7 +264,7 @@ module Raykit
|
|
264
264
|
|
265
265
|
begin
|
266
266
|
puts "remote: #{remote}"
|
267
|
-
cmd = Raykit::Rake.run(remote, "
|
267
|
+
cmd = Raykit::Rake.run(remote, "main")
|
268
268
|
elapsed_str = Timer.get_elapsed_str(cmd.elapsed)
|
269
269
|
if cmd.exitstatus.zero?
|
270
270
|
puts "#{elapsed_str} #{Rainbow(SECRETS.hide(cmd.command)).yellow.bright} (#{cmd.directory})"
|
data/lib/raykit/git/directory.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
module Raykit
|
4
3
|
module Git
|
5
4
|
# Functionality to manage a local clone of a git repository
|
@@ -152,7 +151,7 @@ module Raykit
|
|
152
151
|
scan = `git branch`.scan(/\*\s([\w.-]+)/)
|
153
152
|
return scan[0][0].to_s if !scan.nil? && scan.length.positive? && scan[0].length.positive?
|
154
153
|
end
|
155
|
-
"
|
154
|
+
"main"
|
156
155
|
end
|
157
156
|
|
158
157
|
def repository
|
data/lib/raykit/tasks.rb
CHANGED
@@ -60,20 +60,12 @@ task :tag do
|
|
60
60
|
if PROJECT.read_only?
|
61
61
|
puts " read only state, skipping tag operation"
|
62
62
|
else
|
63
|
-
if (
|
64
|
-
|
65
|
-
else
|
66
|
-
GIT_DIRECTORY.tag_version PROJECT.version
|
63
|
+
if (PROJECT.version != PROJECT.latest_tag)
|
64
|
+
try "git tag -a #{PROJECT.version} -m\"version #{PROJECT.version}\""
|
67
65
|
try "git push --tags"
|
66
|
+
else
|
67
|
+
puts " tag #{PROJECT.latest_tag} already exists."
|
68
68
|
end
|
69
|
-
#if (PROJECT.latest_tag != "v#{PROJECT.version}")
|
70
|
-
# GIT_DIRECTORY.tag_version PROJECT.version
|
71
|
-
#if (PROJECT.version != PROJECT.latest_tag)
|
72
|
-
#try "git tag -a #{PROJECT.version} -m\"version #{PROJECT.version}\""
|
73
|
-
# try "git push --tags"
|
74
|
-
#else
|
75
|
-
# puts " tag #{PROJECT.latest_tag} already exists."
|
76
|
-
#end
|
77
69
|
end
|
78
70
|
end
|
79
71
|
|
data/lib/raykit/zip.rb
CHANGED
@@ -60,14 +60,5 @@ module Raykit
|
|
60
60
|
puts " added " << count.to_s << " files to " << @filename
|
61
61
|
}
|
62
62
|
end
|
63
|
-
|
64
|
-
def self.zip_directory(directory, zipfile_name, overwrite = true)
|
65
|
-
File.delete(zipfile_name) if File.exist?(zipfile_name) && overwrite
|
66
|
-
::Zip::File.open(zipfile_name, ::Zip::File::CREATE) do |zipfile|
|
67
|
-
Dir[File.join(directory, "**", "**")].each do |file|
|
68
|
-
zipfile.add(file.sub(directory + "/", ""), file)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
63
|
end
|
73
64
|
end
|
data/lib/raykit.rb
CHANGED
@@ -16,6 +16,15 @@ SECRETS = Raykit::Secrets.new
|
|
16
16
|
REPOSITORIES = Raykit::Git::Repositories.new("#{Raykit::Environment.get_dev_dir("log")}/Raykit.Git.Repositories.json")
|
17
17
|
GIT_DIRECTORY = Raykit::Git::Directory.new(Rake.application.original_dir)
|
18
18
|
|
19
|
+
def backup_git_directory
|
20
|
+
if ENV["GIT_BACKUP_DIR"] && !ENV["GIT_BACKUP_DIR"].empty?
|
21
|
+
puts "Backing up #{GIT_DIRECTORY.repository.url}"
|
22
|
+
Raykit::Git::Repository::backup GIT_DIRECTORY.repository.url, "#{ENV["GIT_BACKUP_DIR"]}/#{GIT_DIRECTORY.repository.relative_path}"
|
23
|
+
else
|
24
|
+
puts "Environment variable GIT_BACKUP_DIR is not set"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
19
28
|
NUGET_DIR = Raykit::Environment::get_dev_dir("nuget")
|
20
29
|
PUBLISH_DIR = Raykit::Environment::get_dev_dir("publish")
|
21
30
|
|
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.466
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
rubygems_version: 3.
|
148
|
+
rubygems_version: 3.3.7
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: ruby gem to support rake ci/cd tasks
|