git-multirepo 1.0.0.beta48 → 1.0.0.beta49
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.multirepo.meta +1 -1
- data/CHANGELOG.md +25 -0
- data/docs/git-multirepo-cheatsheet.docx +0 -0
- data/lib/info.rb +1 -1
- data/lib/multirepo/commands/install-command.rb +6 -1
- data/lib/multirepo/commands/open-command.rb +4 -4
- data/lib/multirepo/commands/update-command.rb +30 -2
- data/lib/multirepo/git/repo.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d705faf852214b42b3a430b147767ed8c0f333d
|
4
|
+
data.tar.gz: abcd5b4b4bbe377360350c0349e061cfef5d1c29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64f96f9b51c7c621280e06e326e3219ddc076fff8e7f6f6667b11d0001d4f7a9d9931b955d2bcafb1a723db1c245631a19746d4e1103fb83edc987fcd37c70d1
|
7
|
+
data.tar.gz: 057b1e54d7d0c063b8fdc9d87097412a7e094ccceca8784f4bcc1f5fe27f9a88a3417d6a083f1dc96103dcc51f8fa91064210d5f7bab7704b253ef5f1cded597
|
data/.multirepo.meta
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
--- !ruby/object:MultiRepo::MetaFile
|
2
|
-
version: 1.0.0.
|
2
|
+
version: 1.0.0.beta48
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
## Releases
|
2
|
+
|
3
|
+
To install betas run `[sudo] gem install git-multirepo --pre`
|
4
|
+
|
5
|
+
## 1.0.0.beta49
|
6
|
+
|
7
|
+
- **Enhancement:** Added --deps, --main and --all flags to `multi update` and update all by default
|
8
|
+
- **Enhancement:** Log a warning on multi install --ci if the main repo HEAD is a merge commit, for CI servers to pick up and optionally force fail with
|
9
|
+
- **Bug Fix:** "HEAD" was stored in the lock file instead of `nil` when in floating HEAD, which caused some operations to have unexpected results
|
10
|
+
- **Bug Fix:** Incorrect default behavior for `multi open` (now defaults to "all")
|
11
|
+
|
12
|
+
## 1.0.0.beta48
|
13
|
+
|
14
|
+
- **New:** `multi update` now updates tracking files in subdependencies
|
15
|
+
- **Enhancement:** Manual and automated code refactorings using RuboCop
|
16
|
+
|
17
|
+
## 1.0.0.beta47
|
18
|
+
|
19
|
+
- **Enhancement:** Running commands using system() when we don't need to grab output (enables interactive commands in `multi do` and fixes clone/fetch progress output)
|
20
|
+
|
21
|
+
## 1.0.0.beta46
|
22
|
+
|
23
|
+
- **Enhancement:** Better `multi install --ci` output
|
24
|
+
- **Enhancement:** Not requiring a multirepo-enabled repo in InspectCommand, else it's not very useful to inspect random repos
|
25
|
+
- **Bug Fix:** Fixed exception in `multi do` when providing only the `--help` flag
|
Binary file
|
data/lib/info.rb
CHANGED
@@ -48,13 +48,18 @@ module MultiRepo
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def log_ci_info
|
51
|
-
Console.
|
51
|
+
Console.log_info("Performing continuous-integration-aware install")
|
52
52
|
Console.log_info("Using git-multirepo #{MultiRepo::VERSION}")
|
53
53
|
|
54
54
|
main_repo = Repo.new(".")
|
55
55
|
main_repo_branch = main_repo.current_branch
|
56
56
|
meta_file = MetaFile.new(".").load
|
57
57
|
|
58
|
+
if (main_repo.head.merge_commit?)
|
59
|
+
Console.log_warning("[MERGE COMMIT] The checked-out main repo revision is a merge commit.")
|
60
|
+
Console.log_warning("[MERGE COMMIT] Lock file might not represent a valid project state.")
|
61
|
+
end
|
62
|
+
|
58
63
|
table = Terminal::Table.new do |t|
|
59
64
|
t.title = "Revision Info"
|
60
65
|
t.add_row ["Tracked Using", "git-multirepo #{meta_file.version}"]
|
@@ -34,13 +34,13 @@ module MultiRepo
|
|
34
34
|
ensure_in_work_tree
|
35
35
|
ensure_multirepo_enabled
|
36
36
|
|
37
|
-
if @
|
38
|
-
open_dependencies
|
39
|
-
open_main
|
40
|
-
elsif @main_only
|
37
|
+
if @main_only
|
41
38
|
open_main
|
39
|
+
elsif @deps_only
|
40
|
+
open_dependencies
|
42
41
|
else
|
43
42
|
open_dependencies
|
43
|
+
open_main
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
@@ -9,23 +9,34 @@ module MultiRepo
|
|
9
9
|
|
10
10
|
def self.options
|
11
11
|
[
|
12
|
+
['[--all]', 'Update the main repository and all dependencies.'],
|
13
|
+
['[--main]', 'Update the main repository.'],
|
14
|
+
['[--deps]', 'Update dependencies.'],
|
12
15
|
['[--force]', 'Update the tracking files even if dependencies contain uncommitted changes.'],
|
13
16
|
['[--commit]', 'Commit the tracking files after updating them.']
|
14
17
|
].concat(super)
|
15
18
|
end
|
16
19
|
|
17
20
|
def initialize(argv)
|
21
|
+
@all = argv.flag?("all")
|
22
|
+
@main_only = argv.flag?("main")
|
23
|
+
@deps_only = argv.flag?("deps")
|
18
24
|
@commit = argv.flag?("commit")
|
19
25
|
@force = argv.flag?("force")
|
20
26
|
super
|
21
27
|
end
|
22
28
|
|
29
|
+
def validate!
|
30
|
+
super
|
31
|
+
unless validate_only_one_flag(@all, @main_only, @deps_only)
|
32
|
+
help! "You can't provide more than one operation modifier (--deps, --main, etc.)"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
23
36
|
def run
|
24
37
|
ensure_in_work_tree
|
25
38
|
ensure_multirepo_enabled
|
26
39
|
|
27
|
-
Console.log_step("Updating...")
|
28
|
-
|
29
40
|
dependencies_clean = Utils.dependencies_clean?(ConfigFile.new(".").load_entries)
|
30
41
|
if dependencies_clean || @force
|
31
42
|
update_tracking_files_step
|
@@ -37,11 +48,28 @@ module MultiRepo
|
|
37
48
|
end
|
38
49
|
|
39
50
|
def update_tracking_files_step
|
51
|
+
if @main_only
|
52
|
+
Console.log_step("Updating main repo...")
|
53
|
+
update_main
|
54
|
+
elsif @deps_only
|
55
|
+
Console.log_step("Updating dependencies...")
|
56
|
+
update_dependencies
|
57
|
+
else
|
58
|
+
Console.log_step("Updating main repo and dependencies...")
|
59
|
+
update_dependencies
|
60
|
+
update_main
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def update_dependencies
|
40
65
|
Performer.dependencies.each do |dependency|
|
41
66
|
path = dependency.config_entry.path
|
42
67
|
name = dependency.config_entry.name
|
43
68
|
update_tracking_files(path, name) if Utils.multirepo_enabled?(path)
|
44
69
|
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def update_main
|
45
73
|
update_tracking_files(".", "main repo")
|
46
74
|
end
|
47
75
|
|
data/lib/multirepo/git/repo.rb
CHANGED
@@ -83,6 +83,7 @@ module MultiRepo
|
|
83
83
|
def current_branch
|
84
84
|
return nil unless exists? && head_born?
|
85
85
|
name = GitRunner.run(@path, "rev-parse --abbrev-ref HEAD", Verbosity::OUTPUT_NEVER).strip
|
86
|
+
return nil if name == "HEAD" # Code assumes that current_branch will be nil when we're in floating HEAD
|
86
87
|
Branch.new(self, name)
|
87
88
|
end
|
88
89
|
|
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.
|
4
|
+
version: 1.0.0.beta49
|
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-06-
|
11
|
+
date: 2015-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -144,6 +144,7 @@ files:
|
|
144
144
|
- .multirepo.meta
|
145
145
|
- .rspec
|
146
146
|
- .rubocop.yml
|
147
|
+
- CHANGELOG.md
|
147
148
|
- Gemfile
|
148
149
|
- Gemfile.lock
|
149
150
|
- LICENSE
|