raykit 0.0.461 → 0.0.462
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raykit/git/directory.rb +9 -0
- data/lib/raykit/git/repository.rb +0 -10
- data/lib/raykit/tasks.rb +4 -12
- data/lib/raykit/zip.rb +0 -9
- 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: 3240f8b6c93054e3356f90c76e597d91f259c00e6ab464aa24638aef05a6ac7b
|
4
|
+
data.tar.gz: ee3ef6b433551c1145df166e275572088a83673f619e086a439e5c90b30350bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecaf07313b78338232954248692e04331ce7ea86f93acfa9a5f3bbdcb1461dcfdc93f469e3bf8fb8b52863c1ad73cd885c300ca8fe28657a13415799dd4d5b90
|
7
|
+
data.tar.gz: cf7e834052c93cf12ebf16db9af5cb20c47abf16d6579df9fd15386ac152147ba3e8b9bdb87524ba07998556f3115ac0d5b009d25e4c5019bd7fc1c6ec659c8c
|
data/lib/raykit/git/directory.rb
CHANGED
@@ -181,6 +181,15 @@ module Raykit
|
|
181
181
|
end
|
182
182
|
end
|
183
183
|
end
|
184
|
+
|
185
|
+
def backup
|
186
|
+
if ENV["GIT_BACKUP_DIR"] && !ENV["GIT_BACKUP_DIR"].empty?
|
187
|
+
puts "Backing up #{GIT_DIRECTORY.repository.url}"
|
188
|
+
Raykit::Git::Repository::backup GIT_DIRECTORY.repository.url, "#{ENV["GIT_BACKUP_DIR"]}/#{GIT_DIRECTORY.repository.relative_path}"
|
189
|
+
else
|
190
|
+
puts "Environment variable GIT_BACKUP_DIR is not set"
|
191
|
+
end
|
192
|
+
end
|
184
193
|
end
|
185
194
|
end
|
186
195
|
end
|
@@ -229,16 +229,6 @@ 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
|
242
232
|
end
|
243
233
|
end
|
244
234
|
end
|
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
|
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.462
|
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-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|