git-multirepo 1.0.0.beta30 → 1.0.0.beta31

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
  SHA1:
3
- metadata.gz: 9a1de24522cb6ef76b22b22d1caba7343a2d0f3f
4
- data.tar.gz: b63b44b46eee51058a87f2ce9e1da10714265745
3
+ metadata.gz: 67e36cbef8314eee8b0d325162acc18c2ce27e64
4
+ data.tar.gz: e62d11f579f9fce15bc06ea316aabd2aa8e6bfcc
5
5
  SHA512:
6
- metadata.gz: 0d65f16c5a500499a2e8a431a0f6da902316b4e83f466ae6100d4c416605c92c74fc2fb37e9cb01d78665caf871c02a3d6195a78d4449d8b01ccb8bdc3b30bb1
7
- data.tar.gz: b81a06bfd77e5c028a6820650c277eb02701b6b41bb5d374fe0d38b9fc129b50d96d1f51c533a6879c45f26bf402121353ed54a64894ea497884483df336df9e
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
@@ -1,5 +1,5 @@
1
1
  module MultiRepo
2
2
  NAME = "git-multirepo"
3
- VERSION = "1.0.0.beta30"
3
+ VERSION = "1.0.0.beta31"
4
4
  DESCRIPTION = "Track multiple Git repositories side-by-side."
5
5
  end
@@ -34,7 +34,7 @@ module MultiRepo
34
34
 
35
35
  Console.log_step("Branching...")
36
36
 
37
- main_repo = main_repo = Repo.new(".")
37
+ main_repo = Repo.new(".")
38
38
  repos = ConfigFile.load.map{ |entry| entry.repo }.push(main_repo)
39
39
 
40
40
  if !Utils.ensure_working_copies_clean(repos) && !@force
@@ -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.beta30
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