raykit 0.0.461 → 0.0.463

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1955e4631d8d6b8f74ef9209960e15eeb1c5a0f65298580770baa6c194e0f81a
4
- data.tar.gz: 249f71291c48f3834d054b22a66fb871d0e1924fd5ef0c4eb281b6551f88c8a4
3
+ metadata.gz: c7614f49907496570d6f65ef46157351d461b4f494f2bd10e256573e7aa0b970
4
+ data.tar.gz: dc412181dd57627f0361b869d52e506e453a35f272ddb725f2dd4c056f1a5cb1
5
5
  SHA512:
6
- metadata.gz: e21696dee8ea2de879beebfea8475fdedd5d99e1570db42675ec62aa7ff54b5fea97b21beac9a0d957751008ac043e494a71ebbd194b1e13a777f01844fd8fdb
7
- data.tar.gz: c8d5afb9649b215bf897ab4c5f2ee7705ee997e013e9bc76482fd81116e0cd5ebc07f254ff0b5667b3d9e6e668b47eb5803442ed092779199d053f0244dab0fd
6
+ metadata.gz: bf2503f919119a8ba95b4b4912064bf9b633c778f332afde3a6e1f206ea1ff867a27eb3cfc7b236e5f3abe7a10ca2cf5d15ebf1a020bebacf64d0b093688fb4e
7
+ data.tar.gz: 067c83257f048b856b5ac4d0f5806e4e2ac90cc6cfa32315aa2e421df3df4f95ac2343b13d08dac02f18a4a2d17c28d263934d2921e489a69adc8d550ea07a5a
@@ -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
@@ -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 (GIT_DIRECTORY.has_tag "v#{PROJECT.version}")
64
- puts " tag #{PROJECT.latest_tag} already exists."
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.461
4
+ version: 0.0.463
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-06-10 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler