git-multirepo 1.0.0.beta57 → 1.0.0.beta58

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: 08fa2ba818b2fd6356962c64ba16f8f8f9a704be
4
- data.tar.gz: 8373a82721b03063b3191c789e8cb1462eaadd88
3
+ metadata.gz: 5d395226345d705bab1e2dcdd86b5f3aa14b48d2
4
+ data.tar.gz: aa3870bdb60046e7906e5292a0bc806104ea4bd5
5
5
  SHA512:
6
- metadata.gz: d0c894b783a977cbdb0ab955f58b52e0ea6ccb18ac0f481fb6e2b0afcb0095dde26e04bcae3d5e7afb5d77cea67834eeb478e192a0e5cabfa3fbfa688f9b1a3a
7
- data.tar.gz: 4a90bd0940a74e7d204e4b60119fbbf4d607cdb9194f5c6c41d8d19a29206a698e969d0f2f386929f8e6a254c3e8695cfbf270a41381d61f8151dc393990f25c
6
+ metadata.gz: 821b990a89c3c0a6f14ce0d1390e6a4b0053101a9e24ebe734307ef3490b00e66a76a499e3a591bf08acfe4a341df0dd3a1bc69ee428eba4771d2a18469a554e
7
+ data.tar.gz: 1363a6fadfa135c58794f71809613cc155b8a0479d6e02c93501b4d6b1fe6de41441debe1f8ebae008061f6ded91e50b119bb6f6e704a61ef4b606d83c88c0ca
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  To install betas run `gem install git-multirepo --pre`
4
4
 
5
+ ## 1.0.0.beta58
6
+
7
+ - **Enhancement:** Support for `multi install` in non git-tracked main "repo" using the `--no-repo` flag (for server-side checkout CI scenarios)
8
+
5
9
  ## 1.0.0.beta57
6
10
 
7
11
  - **Bug Fix:** Fixed error in multi install clone error message building
@@ -15,13 +15,15 @@ module MultiRepo
15
15
  def self.options
16
16
  [
17
17
  ['[--hooks]', 'Only install local git hooks.'],
18
- ['[--ci]', 'Perform a continuous-integration-aware install (such as on a CI build server or agent).']
18
+ ['[--ci]', 'Perform a continuous-integration-aware install (such as on a CI build server or agent).'],
19
+ ['[--no-repo]', 'Tell multirepo that the directory is not a git repository. Useful when the main repo is not a git working copy in CI scenarios.']
19
20
  ].concat(super)
20
21
  end
21
22
 
22
23
  def initialize(argv)
23
24
  @hooks = argv.flag?("hooks")
24
25
  @ci = argv.flag?("ci")
26
+ @repo = argv.flag?("repo", true)
25
27
  super
26
28
  end
27
29
 
@@ -33,7 +35,7 @@ module MultiRepo
33
35
  end
34
36
 
35
37
  def run
36
- ensure_in_work_tree unless @ci
38
+ ensure_in_work_tree if @no_repo
37
39
  ensure_multirepo_tracked
38
40
 
39
41
  if @hooks
@@ -48,37 +50,6 @@ module MultiRepo
48
50
  Console.log_step("Done!")
49
51
  end
50
52
 
51
- def log_ci_info
52
- Console.log_info("Performing continuous-integration-aware install")
53
- Console.log_info("Using git-multirepo #{MultiRepo::VERSION}")
54
-
55
- main_repo = Repo.new(".")
56
- main_repo_branch = main_repo.current_branch
57
- meta_file = MetaFile.new(".").load
58
-
59
- if main_repo.head.merge_commit?
60
- Console.log_warning("[MERGE COMMIT] The checked-out main repo revision is a merge commit.")
61
- Console.log_warning("[MERGE COMMIT] Lock file might not represent a valid project state.")
62
- end
63
-
64
- table = Terminal::Table.new do |t|
65
- t.title = "Revision Info"
66
- t.add_row ["Tracked Using", "git-multirepo #{meta_file.version}"]
67
- t.add_separator
68
- t.add_row ["Main Repo", commit_info(main_repo.head.commit_id, (main_repo_branch.name rescue nil))]
69
- t.add_separator
70
- LockFile.new(".").load_entries.each do |lock_entry|
71
- branch_name = lock_entry.branch
72
- t.add_row [lock_entry.name, commit_info(lock_entry.head, branch_name)]
73
- end
74
- end
75
- puts table
76
- end
77
-
78
- def commit_info(commit_id, branch_name)
79
- commit_id + (branch_name ? " (on branch #{branch_name})" : "")
80
- end
81
-
82
53
  def full_install
83
54
  install_dependencies_step
84
55
  install_hooks_step unless @ci
@@ -157,5 +128,46 @@ module MultiRepo
157
128
  fail MultiRepoException, "'#{dependency.config_entry.path}' origin URL (#{dependency.config_entry.repo.remote('origin').url}) does not match entry (#{dependency.config_entry.url})!"
158
129
  end
159
130
  end
131
+
132
+ # Logging
133
+
134
+ def log_ci_info
135
+ Console.log_info("Performing continuous-integration-aware install")
136
+ Console.log_info("Using git-multirepo #{MultiRepo::VERSION}")
137
+
138
+ main_repo = Repo.new(".")
139
+
140
+ return unless @repo
141
+ log_merge_commit_warning(main_repo)
142
+ log_merge_table(main_repo)
143
+ end
144
+
145
+ def log_merge_commit_warning(main_repo)
146
+ if main_repo.head.merge_commit?
147
+ Console.log_warning("[MERGE COMMIT] The checked-out main repo revision is a merge commit.")
148
+ Console.log_warning("[MERGE COMMIT] Lock file might not represent a valid project state.")
149
+ end
150
+ end
151
+
152
+ def log_merge_table(main_repo)
153
+ meta_file = MetaFile.new(".").load
154
+ main_repo_branch = main_repo.current_branch
155
+
156
+ puts Terminal::Table.new do |t|
157
+ t.title = "Revision Info"
158
+ t.add_row ["Tracked Using", "git-multirepo #{meta_file.version}"]
159
+ t.add_separator
160
+ t.add_row ["Main Repo", commit_info(main_repo.head.commit_id, (main_repo_branch.name rescue nil))]
161
+ t.add_separator
162
+ LockFile.new(".").load_entries.each do |lock_entry|
163
+ branch_name = lock_entry.branch
164
+ t.add_row [lock_entry.name, commit_info(lock_entry.head, branch_name)]
165
+ end
166
+ end
167
+ end
168
+
169
+ def commit_info(commit_id, branch_name)
170
+ commit_id + (branch_name ? " (on branch #{branch_name})" : "")
171
+ end
160
172
  end
161
173
  end
@@ -1,5 +1,5 @@
1
1
  module MultiRepo
2
2
  NAME = "git-multirepo"
3
- VERSION = "1.0.0.beta57"
3
+ VERSION = "1.0.0.beta58"
4
4
  DESCRIPTION = "Track multiple Git repositories side-by-side."
5
5
  end
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.beta57
4
+ version: 1.0.0.beta58
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-11-12 00:00:00.000000000 Z
11
+ date: 2015-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler