ebm 0.0.37 → 0.0.38

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: 4a88f7e94abc02f1a8f27469198768c1d07e5898
4
- data.tar.gz: 38a597c5670e160ab075478b59f83d62baa0cd7d
3
+ metadata.gz: b769158e4f7513a5956eb42cbd1863843492a6ca
4
+ data.tar.gz: 9b3cb41b5e9f360ddca77f061ab5fc4dab28b289
5
5
  SHA512:
6
- metadata.gz: 770d4d313731da350e5c0ec400948dad2c5bbed71cdcb6040779a430dc2a6a5baf1760ae01e7dbb5a30cbac92d6d68a3be5dafbe77c07a98bf41d5847a2cdbaa
7
- data.tar.gz: eeba46413525574f847535290925110bd3bcd4d553f4ea3433fc015324a38b1f73e141c9cafba0e8a6392d51f02790482e280e2943935f2715d9e66125c3acff
6
+ metadata.gz: e2312d13e7a8e301e8405072657f31e49f8afd190801d626c35e998d42e729ee274694a5ff4049d6e758cb9c524a5a96461ce989673d0b7e289e327a6d603d92
7
+ data.tar.gz: 6aaea810524e69312ea30b61023b63b2a759f802cbf44c6d31ad7dd26c1a990326ca2cbd8939db64fbd75b19505a6db03e2d47ac2aca9585f627541a958d8f49
@@ -45,14 +45,16 @@ module Commands
45
45
  opts.on("--with-local-version", "Also include a local version branch, only applies with the -i option.") do |v|
46
46
  options[:with_local_version] = true
47
47
  end
48
-
48
+ opts.on('-n', "--shallow", "Checkout only level one to only have first level of history") do |v|
49
+ options[:shallow] = true
50
+ end
49
51
  end
50
52
 
51
53
  # prepare a single repo and create a local and tracking branch if it should have one
52
54
  # if the repo specifies a branch then we will do the initial fetch from that branch
53
55
  # if the create_dev_branch flag is set, we will create a local and tracking branch with
54
56
  # the developer initials prepended
55
- def prepare_repo(repo, top_dir, initials, nobranch, with_local_version)
57
+ def prepare_repo(repo, top_dir, initials, nobranch, with_local_version, shallow)
56
58
  git_path = repo[:git_path]
57
59
  branch = repo[:branch]
58
60
  create_dev_branch = (repo[:create_dev_branch] == true) && (!nobranch)
@@ -76,7 +78,7 @@ module Commands
76
78
  end
77
79
 
78
80
  # first clone the repo
79
- cmd = "git clone #{git_path} -b #{branch}"
81
+ cmd = "git clone #{git_path} -b #{branch} #{shallow}"
80
82
  if EbmSharedLib::CL.do_cmd_result(cmd, top_dir) != 0
81
83
  raise "Cloning repo at #{git_path} failed."
82
84
  end
@@ -144,6 +146,7 @@ module Commands
144
146
  initials = options[:initials]
145
147
  nobranch = !!options[:nobranch]
146
148
  with_local_version = !!options[:with_local_version]
149
+ shallow = !!options[:shallow] ? "--depth=1" : ""
147
150
 
148
151
  if (nobranch && initials)
149
152
  raise "You must specify either the --initials or --no-branch, not both."
@@ -172,7 +175,7 @@ module Commands
172
175
 
173
176
  repos = info[:repos]
174
177
  repos.each do |repo|
175
- prepare_repo(repo, top_dir, initials, nobranch, with_local_version)
178
+ prepare_repo(repo, top_dir, initials, nobranch, with_local_version, shallow)
176
179
  end
177
180
 
178
181
  # finish up by writing settings
@@ -7,6 +7,6 @@
7
7
  #
8
8
  class Info
9
9
  def self.version
10
- "0.0.37"
10
+ "0.0.38"
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.0.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Seitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-23 00:00:00.000000000 Z
11
+ date: 2014-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: subcommand