git-multirepo 1.0.0.beta52 → 1.0.0.beta53
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 +4 -0
- data/lib/multirepo/commands/command.rb +1 -0
- data/lib/multirepo/commands/install-command.rb +7 -2
- data/lib/multirepo/config.rb +3 -0
- data/lib/multirepo/git/repo.rb +13 -7
- data/lib/multirepo/info.rb +1 -1
- data/lib/multirepo/utility/extra-output.rb +13 -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: e241516a0e4d6b2d905ff5c186598099e3451474
|
4
|
+
data.tar.gz: 2fb4193655dde03f7a23fd33da4fccd5ac6cab14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa86c391de6736f050fc63d519459bbf025780a634af18b2b10429ebdb96a27a34691d0fc9658c7d0fe5f26fdb8d2b8c5977f5fd7f306bb03a1dc433fed3ed48
|
7
|
+
data.tar.gz: 0e8e7e4783b31e97f2131436da94e3c6c385930d5f961610640d5bff32b45c91d813f69340a5610382626aca9d720434da7a2adb618248dcd5b8263fb25e6a37
|
data/.multirepo.meta
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
--- !ruby/object:MultiRepo::MetaFile
|
2
|
-
version: 1.0.0.
|
2
|
+
version: 1.0.0.beta52
|
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.beta53
|
6
|
+
|
7
|
+
- **Enhancement:** Added a `--ci-output` flag to output additional CI server-specific messages (such as TeamCity service messages)
|
8
|
+
|
5
9
|
## 1.0.0.beta52
|
6
10
|
|
7
11
|
- **Enhancement:** InspectCommand now takes the name of a stat as input instead of flags and provides helpful output if the provided stat name is invalid
|
@@ -24,6 +24,7 @@ module MultiRepo
|
|
24
24
|
def initialize(argv)
|
25
25
|
@argv = argv
|
26
26
|
Config.instance.verbose |= argv.flag?("verbose") ? true : false
|
27
|
+
Config.instance.extra_output = argv.option("extra-output")
|
27
28
|
Config.instance.git_executable = argv.option("git-exe", "git")
|
28
29
|
super
|
29
30
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require "terminal-table"
|
2
2
|
|
3
3
|
require "multirepo/utility/console"
|
4
|
+
require "multirepo/utility/extra-output"
|
4
5
|
require "multirepo/utility/utils"
|
5
6
|
require "multirepo/git/repo"
|
6
7
|
require "multirepo/logic/performer"
|
@@ -40,6 +41,7 @@ module MultiRepo
|
|
40
41
|
install_hooks_step
|
41
42
|
else
|
42
43
|
Console.log_step("Installing dependencies...")
|
44
|
+
ExtraOutput.log("Installing dependencies") if @ci
|
43
45
|
log_ci_info if @ci
|
44
46
|
full_install
|
45
47
|
end
|
@@ -122,10 +124,12 @@ module MultiRepo
|
|
122
124
|
if dependency.config_entry.repo.exists?
|
123
125
|
check_repo_validity(dependency)
|
124
126
|
|
125
|
-
Console.log_substep("Working copy '#{dependency.config_entry.repo.path}' already exists, fetching...")
|
127
|
+
Console.log_substep("Working copy '#{dependency.config_entry.repo.path}' already exists, fetching...")
|
128
|
+
ExtraOutput.log("Fetching #{dependency.config_entry.repo.basename}") if @ci
|
126
129
|
fetch_repo(dependency)
|
127
130
|
else
|
128
131
|
Console.log_substep("Cloning #{dependency.config_entry.url} into '#{dependency.config_entry.repo.path}'")
|
132
|
+
ExtraOutput.log("Cloning into #{dependency.config_entry.repo.basename}") if @ci
|
129
133
|
clone_repo(dependency)
|
130
134
|
end
|
131
135
|
end
|
@@ -137,7 +141,8 @@ module MultiRepo
|
|
137
141
|
end
|
138
142
|
|
139
143
|
def clone_repo(dependency)
|
140
|
-
|
144
|
+
options = { :branch => dependency.lock_entry.branch, :quiet => true }
|
145
|
+
unless dependency.config_entry.repo.clone(dependency.config_entry.url, options)
|
141
146
|
fail MultiRepoException, "Could not clone remote #{dependency.config_entry.url} with branch #{dependency.config_entry.branch}"
|
142
147
|
end
|
143
148
|
end
|
data/lib/multirepo/config.rb
CHANGED
data/lib/multirepo/git/repo.rb
CHANGED
@@ -50,16 +50,22 @@ module MultiRepo
|
|
50
50
|
# Operations
|
51
51
|
|
52
52
|
def fetch
|
53
|
-
GitRunner.run_as_system(@path, "fetch --prune
|
53
|
+
GitRunner.run_as_system(@path, "fetch --prune")
|
54
54
|
GitRunner.last_command_succeeded
|
55
55
|
end
|
56
56
|
|
57
|
-
def clone(url,
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
57
|
+
def clone(url, options = nil)
|
58
|
+
options = {} unless options
|
59
|
+
branch = options[:branch]
|
60
|
+
shallow = options[:shallow] || false
|
61
|
+
quiet = options[:quiet] || false
|
62
|
+
|
63
|
+
command = "clone #{url} #{@path}"
|
64
|
+
command << " -q" if quiet
|
65
|
+
command << " -b #{branch}" if branch
|
66
|
+
command << " --depth 1" if shallow
|
67
|
+
|
68
|
+
GitRunner.run_as_system(".", command)
|
63
69
|
GitRunner.last_command_succeeded
|
64
70
|
end
|
65
71
|
|
data/lib/multirepo/info.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
module MultiRepo
|
2
|
+
class ExtraOutput
|
3
|
+
def self.log(message)
|
4
|
+
case Config.instance.extra_output
|
5
|
+
when "teamcity"; log_teamcity(message)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.log_teamcity(message)
|
10
|
+
puts "##teamcity[progressMessage '#{message}']"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
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.
|
4
|
+
version: 1.0.0.beta53
|
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
|
+
date: 2015-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- lib/multirepo/logic/revision-selector.rb
|
203
203
|
- lib/multirepo/multirepo-exception.rb
|
204
204
|
- lib/multirepo/utility/console.rb
|
205
|
+
- lib/multirepo/utility/extra-output.rb
|
205
206
|
- lib/multirepo/utility/popen-runner.rb
|
206
207
|
- lib/multirepo/utility/system-runner.rb
|
207
208
|
- lib/multirepo/utility/utils.rb
|