raykit 0.0.463 → 0.0.465
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 +2 -1
- data/lib/raykit/git/directory.rb +1 -0
- data/lib/raykit/git/repository.rb +10 -0
- data/lib/raykit/tasks.rb +12 -4
- data/lib/raykit/zip.rb +9 -0
- data/lib/raykit.rb +0 -9
- 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: c2820f51c6a0bcff63601d496f2ca0069f0893d37a7023656e414c2161141387
|
4
|
+
data.tar.gz: 7e980b2ecef152e846ee722a754e362986ef2dddcf69741caca3c61669bda28d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2645816c3016896fb4359eef182c331361d9d2d630613d3cf7fbb3c5536e74666e1a9d2e55e5d07a3a3ed5cebcf31ebad7d6a83bb32f30a58c658c6b3db540a6
|
7
|
+
data.tar.gz: 2f1813c8c2aa5774342ad84ff7381b85067ef0c6b8c85c54878413eb117f0cf2258fc25bc74d163f8fc3032b59b3e318364270ec4423efbfa2d2b7d462b8cb50
|
data/lib/raykit/command.rb
CHANGED
data/lib/raykit/git/directory.rb
CHANGED
@@ -229,6 +229,16 @@ module Raykit
|
|
229
229
|
FileUtils.rm_rf(make_dir) if (cmd.exitstatus == 0)
|
230
230
|
cmd
|
231
231
|
end
|
232
|
+
|
233
|
+
def self.backup(url, backup_dir)
|
234
|
+
if (Dir.exist?(backup_dir))
|
235
|
+
Dir.chdir(backup_dir) do
|
236
|
+
run("git pull")
|
237
|
+
end
|
238
|
+
else
|
239
|
+
run("git clone #{url} \"#{backup_dir}\"")
|
240
|
+
end
|
241
|
+
end
|
232
242
|
end
|
233
243
|
end
|
234
244
|
end
|
data/lib/raykit/tasks.rb
CHANGED
@@ -60,12 +60,20 @@ task :tag do
|
|
60
60
|
if PROJECT.read_only?
|
61
61
|
puts " read only state, skipping tag operation"
|
62
62
|
else
|
63
|
-
if (
|
64
|
-
try "git tag -a #{PROJECT.version} -m\"version #{PROJECT.version}\""
|
65
|
-
try "git push --tags"
|
66
|
-
else
|
63
|
+
if (GIT_DIRECTORY.has_tag "v#{PROJECT.version}")
|
67
64
|
puts " tag #{PROJECT.latest_tag} already exists."
|
65
|
+
else
|
66
|
+
GIT_DIRECTORY.tag_version PROJECT.version
|
67
|
+
try "git push --tags"
|
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
|
69
77
|
end
|
70
78
|
end
|
71
79
|
|
data/lib/raykit/zip.rb
CHANGED
@@ -60,5 +60,14 @@ 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
|
63
72
|
end
|
64
73
|
end
|
data/lib/raykit.rb
CHANGED
@@ -16,15 +16,6 @@ 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
|
-
|
28
19
|
NUGET_DIR = Raykit::Environment::get_dev_dir("nuget")
|
29
20
|
PUBLISH_DIR = Raykit::Environment::get_dev_dir("publish")
|
30
21
|
|
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.465
|
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-
|
11
|
+
date: 2023-09-11 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.4.19
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: ruby gem to support rake ci/cd tasks
|