git-multirepo 1.0.0.beta44 → 1.0.0.beta45

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c94db73c957e83def2963148314ae81c9867655a
4
- data.tar.gz: a9ccff47aed61ed13e5c63e91edc9186acbd142a
3
+ metadata.gz: 361b68527d2c9b898a62bedfaa471f44e2f6efef
4
+ data.tar.gz: 1eed81c527c179d8048c088feb7be89615bfef32
5
5
  SHA512:
6
- metadata.gz: 6e21d03ac2e5a534db8e82e33aac4f825c3cf1a1b623f6f00431bb8979e613419ebc05a2e8ca26df5d06cdfee4661e310c3146f5cc3bffafd8b6457b3f777b9e
7
- data.tar.gz: 1c1ffe438f95de180904f875649419eba79aa6897036a3e278c7695706874af5ecaddd22d72431bd91ac27362355bea2e469c24d71be4f43114a6bd2af55eb12
6
+ metadata.gz: 23212fa9a47c6c53096c96796c62f529892d5151673399c0335be6065cf4a7bc9ef57d762a460046709e24290f0aa9bc8d9f7970518da6a165f34779ebff84e7
7
+ data.tar.gz: ad3f69b29252e51876fcd5d9972bf84eb709e9e81a37a5b2800c47e66777e9236d77aa4fd3d0f38fb6736b5be5f1b695c90355e60ad4948a87ad89c1de2a6b97
data/.multirepo.meta CHANGED
@@ -1,2 +1,2 @@
1
1
  --- !ruby/object:MultiRepo::MetaFile
2
- version: 1.0.0.beta43
2
+ version: 1.0.0.beta44
data/README.md CHANGED
@@ -122,6 +122,7 @@ Here is a quick rundown of commands available to you in git-multirepo:
122
122
  | clone | Clones the specified repository in a subfolder, then installs it. |
123
123
  | do | Perform an arbitrary Git operation in the main repository, dependency repositories or all repositories. |
124
124
  | graph | Graphs the dependency tree from the current repository. |
125
+ | inspect | Outputs various information about multirepo-enabled repos. For use in scripting and CI scenarios. |
125
126
  | install | Clones and checks out dependencies as defined in the version-controlled multirepo metadata files and installs git-multirepo's local git hooks. Idempotent for a given main repo checkout. |
126
127
  | merge | Performs a git merge on all dependencies and the main repo, in the proper order. |
127
128
  | open | Opens repositories in the OS's file explorer. |
data/lib/commands.rb CHANGED
@@ -6,6 +6,7 @@ require_relative "multirepo/commands/clone-command"
6
6
  require_relative "multirepo/commands/do-command"
7
7
  require_relative "multirepo/commands/graph-command"
8
8
  require_relative "multirepo/commands/init-command"
9
+ require_relative "multirepo/commands/inspect-command"
9
10
  require_relative "multirepo/commands/install-command"
10
11
  require_relative "multirepo/commands/merge-command"
11
12
  require_relative "multirepo/commands/open-command"
data/lib/info.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module MultiRepo
2
2
  NAME = "git-multirepo"
3
- VERSION = "1.0.0.beta44"
3
+ VERSION = "1.0.0.beta45"
4
4
  DESCRIPTION = "Track multiple Git repositories side-by-side."
5
5
  end
@@ -0,0 +1,40 @@
1
+ require "multirepo/utility/console"
2
+ require "multirepo/utility/utils"
3
+
4
+ module MultiRepo
5
+ class InspectCommand < Command
6
+ self.command = "inspect"
7
+ self.summary = "Outputs various information about multirepo-enabled repos. For use in scripting and CI scenarios."
8
+
9
+ def self.options
10
+ [
11
+ ['[--version]', 'Outputs the multirepo version that was used to track this revision.'],
12
+ ['[--tracked]', 'Whether the current revision is tracked by multirepo or not.']
13
+ ].concat(super)
14
+ end
15
+
16
+ def initialize(argv)
17
+ @version = argv.flag?("version")
18
+ @tracked = argv.flag?("tracked")
19
+ super
20
+ end
21
+
22
+ def validate!
23
+ super
24
+ unless validate_only_one_flag(@version, @tracked)
25
+ help! "You can't provide more than one operation modifier (--version, --tracked, etc.)"
26
+ end
27
+ end
28
+
29
+ def run
30
+ ensure_in_work_tree
31
+ ensure_multirepo_enabled
32
+
33
+ if @version
34
+ puts MetaFile.new(".").load.version
35
+ elsif @tracked
36
+ puts Utils.is_multirepo_tracked(".").to_s
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,3 +1,5 @@
1
+ require "terminal-table"
2
+
1
3
  require "multirepo/utility/console"
2
4
  require "multirepo/utility/utils"
3
5
  require "multirepo/git/repo"
@@ -38,13 +40,29 @@ module MultiRepo
38
40
  install_hooks_step
39
41
  else
40
42
  Console.log_step("Installing dependencies...")
41
- Console.log_warning("Performing continuous-integration-aware install")
43
+ log_ci_info if @ci
42
44
  full_install
43
45
  end
44
46
 
45
47
  Console.log_step("Done!")
46
48
  end
47
49
 
50
+ def log_ci_info
51
+ Console.log_warning("Performing continuous-integration-aware install")
52
+
53
+ meta_file = MetaFile.new(".").load
54
+ lock_entries = LockFile.new(".").load_entries
55
+ table = Terminal::Table.new do |t|
56
+ t.title = "Revision Info"
57
+ t.add_row ["git-multirepo version", meta_file.version]
58
+ lock_entries.each do |lock_entry|
59
+ branch = lock_entry.branch
60
+ t.add_row [lock_entry.name, lock_entry.head + (branch ? " (on branch #{branch})" : "")]
61
+ end
62
+ end
63
+ puts table
64
+ end
65
+
48
66
  def full_install
49
67
  install_dependencies_step
50
68
  install_hooks_step unless @ci
@@ -30,7 +30,7 @@ module MultiRepo
30
30
  end
31
31
 
32
32
  def load
33
- Psych.load(file)
33
+ Psych.load(File.read(file))
34
34
  end
35
35
 
36
36
  def update
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-multirepo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta44
4
+ version: 1.0.0.beta45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michaël Fortin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-31 00:00:00.000000000 Z
11
+ date: 2015-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -166,6 +166,7 @@ files:
166
166
  - lib/multirepo/commands/do-command.rb
167
167
  - lib/multirepo/commands/graph-command.rb
168
168
  - lib/multirepo/commands/init-command.rb
169
+ - lib/multirepo/commands/inspect-command.rb
169
170
  - lib/multirepo/commands/install-command.rb
170
171
  - lib/multirepo/commands/merge-command.rb
171
172
  - lib/multirepo/commands/open-command.rb