git-multirepo 1.0.0.beta30 → 1.0.0.beta31
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/commands.rb +1 -0
- data/lib/info.rb +1 -1
- data/lib/multirepo/commands/branch-command.rb +1 -1
- data/lib/multirepo/commands/clean-command.rb +32 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67e36cbef8314eee8b0d325162acc18c2ce27e64
|
4
|
+
data.tar.gz: e62d11f579f9fce15bc06ea316aabd2aa8e6bfcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec0d4681372e9d30752a11d4cfd68198de1cb3fd474df1113978e724c739c511ef1d045143250c90aecce54fbdbcf1b41823df3875a8a30e108c69175eda9c6a
|
7
|
+
data.tar.gz: 0b891af101c561781915c64a023df4de187ea61106c127f354d8f0d9d56f698107b4ef8e2684018f0323252860876134600c39ef7d2622dcd69952e4345c7add
|
data/lib/commands.rb
CHANGED
@@ -2,6 +2,7 @@ require_relative "multirepo/commands/command"
|
|
2
2
|
require_relative "multirepo/commands/add-command"
|
3
3
|
require_relative "multirepo/commands/branch-command"
|
4
4
|
require_relative "multirepo/commands/checkout-command"
|
5
|
+
require_relative "multirepo/commands/clean-command"
|
5
6
|
require_relative "multirepo/commands/clone-command"
|
6
7
|
require_relative "multirepo/commands/fetch-command"
|
7
8
|
require_relative "multirepo/commands/init-command"
|
data/lib/info.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
require "multirepo/utility/console"
|
2
|
+
|
3
|
+
module MultiRepo
|
4
|
+
class CleanCommand < Command
|
5
|
+
self.command = "clean"
|
6
|
+
self.summary = "Performs a 'git clean -df' on the main repo and all dependencies."
|
7
|
+
|
8
|
+
def run
|
9
|
+
super
|
10
|
+
validate_in_work_tree
|
11
|
+
ensure_multirepo_enabled
|
12
|
+
|
13
|
+
Console.log_step("Fetching dependencies...")
|
14
|
+
|
15
|
+
Console.log_substep("Cleaning main repo...")
|
16
|
+
clean(".")
|
17
|
+
|
18
|
+
ConfigFile.load.each do |entry|
|
19
|
+
Console.log_substep("Cleaning #{entry.repo.path} ...")
|
20
|
+
clean(entry.repo.path)
|
21
|
+
end
|
22
|
+
|
23
|
+
Console.log_step("Done!")
|
24
|
+
rescue MultiRepoException => e
|
25
|
+
Console.log_error(e.message)
|
26
|
+
end
|
27
|
+
|
28
|
+
def clean(repo_path)
|
29
|
+
Git.run_in_working_dir(repo_path, "clean -df", Runner::Verbosity::ALWAYS_OUTPUT)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-multirepo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michaël Fortin
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- lib/multirepo/commands/add-command.rb
|
128
128
|
- lib/multirepo/commands/branch-command.rb
|
129
129
|
- lib/multirepo/commands/checkout-command.rb
|
130
|
+
- lib/multirepo/commands/clean-command.rb
|
130
131
|
- lib/multirepo/commands/clone-command.rb
|
131
132
|
- lib/multirepo/commands/command.rb
|
132
133
|
- lib/multirepo/commands/fetch-command.rb
|