fastlane-plugin-git_clone 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: 64eb120dee35d9d1e1e5e6fae180359223e450afa5d1e838903b9feea5102c2f
4
- data.tar.gz: d8a21a8d511c01026c7fc3c42e06af2e9d976e31a29e3262fabfcb985cbd63dd
3
+ metadata.gz: 912e8917c6544d2868e9a09a43bba90c00c9aec135e82f0d7b7fcda3291f78df
4
+ data.tar.gz: 456f035ee3f441366d1bc4d3f39223990485f7b451b60524c2dd049cc7b1d725
5
5
  SHA512:
6
- metadata.gz: acfe0b8f735ae5c78c4ca20d16831526632230d0b7abdb7561ad3334f33e74e8d999d5ca1bee7138260b625c4858c64c54f8e7dc8a33406065d139b3d7916a28
7
- data.tar.gz: 7967cd0c99c8813699726b88329193f1af626fbd5647920e0898426e338477ee77c6d8b3f92610dd433d7293eb7c6996bf56d1ecc8078aab8af1c3b1b7fb89e7
6
+ metadata.gz: aac905f5787b17ce51612e83ede4b16ea6fe57cda1f04b33eaaef1f357dca385000a24fdfe9a61da4c0db881c65f9bcf066019d0f6ad5baa2cf928721804a642
7
+ data.tar.gz: dce3469415e7ce70ac9ab71e32402ee3dbaca0861deb63ab84ab578052c71f931da4a60f039092b7ede94855dab5e129931a7dd0ba90d63ef3788e00b70f8202
@@ -35,24 +35,22 @@ module Fastlane
35
35
  branch = params[:branch]
36
36
  commit = params[:commit]
37
37
  tag = params[:tag]
38
- depth = params[:depth] || 1
38
+ depth = params[:depth]
39
39
  single_branch = params[:single_branch] || false
40
40
 
41
- cmd = if commit
42
- [
43
- "git clone #{git} #{path}",
44
- "cd #{path}",
45
- "git checkout #{commit}"
46
- ].join(';')
47
- else
48
- [
49
- "git clone #{git} #{path}",
50
- ("-b #{branch} " if branch),
51
- ("-b #{tag} " if tag),
52
- ("--depth=#{depth} " if depth),
53
- ("--single-branch " if single_branch)
54
- ].compact.join(' ')
55
- end
41
+ git_clone_cmd = [
42
+ "git clone #{git} #{path}",
43
+ ("-b #{branch}" if branch),
44
+ ("-b #{tag}" if tag),
45
+ ("--depth=#{depth}" if depth),
46
+ ("--single-branch" if single_branch)
47
+ ].compact.join(' ')
48
+ # UI.important(cmd)
49
+
50
+ cmd = [
51
+ git_clone_cmd,
52
+ (["cd #{path}", "git checkout #{commit}"] if commit)
53
+ ].compact.join(';')
56
54
 
57
55
  if sh(cmd) { |s| s.success? }
58
56
  UI.success "✅ clone #{git} to #{path}"
@@ -79,6 +77,7 @@ module Fastlane
79
77
  ("git pull origin #{branch}" if origin),
80
78
  ("git pull upstream #{branch}" if upstream)
81
79
  ].compact.join(';')
80
+ # UI.important(cmd)
82
81
 
83
82
  if sh(cmd) { |s| s.success? }
84
83
  UI.success "✅ update #{git} to #{path}"
@@ -119,7 +118,7 @@ module Fastlane
119
118
  optional: true,
120
119
  default_value: false,
121
120
  is_string: false,
122
- conflicting_options: [:branch, :tag, :commit, :depth, :single_branch]
121
+ conflicting_options: [:tag, :commit, :depth, :single_branch]
123
122
  ),
124
123
  FastlaneCore::ConfigItem.new(
125
124
  key: :origin,
@@ -137,18 +136,11 @@ module Fastlane
137
136
  is_string: false,
138
137
  conflicting_options: [:origin]
139
138
  ),
140
- FastlaneCore::ConfigItem.new(
141
- key: :depth,
142
- description: "--depth=1",
143
- is_string: false,
144
- type: Integer,
145
- optional: true
146
- ),
147
139
  FastlaneCore::ConfigItem.new(
148
140
  key: :branch,
149
141
  description: "-b master",
150
142
  optional: true,
151
- conflicting_options: [:tag, :commit]
143
+ conflicting_options: [:tag]
152
144
  ),
153
145
  FastlaneCore::ConfigItem.new(
154
146
  key: :tag,
@@ -160,14 +152,23 @@ module Fastlane
160
152
  key: :commit,
161
153
  description: "git checkout commit",
162
154
  optional: true,
163
- conflicting_options: [:branch, :tag, :depth, :single_branch]
155
+ conflicting_options: [:tag]
156
+ ),
157
+ FastlaneCore::ConfigItem.new(
158
+ key: :depth,
159
+ description: "--depth=1",
160
+ is_string: false,
161
+ type: Integer,
162
+ optional: true,
163
+ conflicting_options: [:commit]
164
164
  ),
165
165
  FastlaneCore::ConfigItem.new(
166
166
  key: :single_branch,
167
167
  description: "--single-branch",
168
168
  optional: true,
169
169
  default_value: false,
170
- is_string: false
170
+ is_string: false,
171
+ conflicting_options: [:commit]
171
172
  )
172
173
  ]
173
174
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GitClone
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-git_clone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - xiongzenghui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-13 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry