fastlane-plugin-yarn 0.1.1 → 0.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea40ff23d9ab2da8db798eaf3b3f8f33149ea552
|
4
|
+
data.tar.gz: 5dd44bf531d90eb39ee589d09eaef6bad655295a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b2af9785ee98958d1f617ac4750afb375e51332e859f26e986a455e92eee9001fef50880d0f9b31944f168901bba3b0c4234b726ea2c8d9e84eea6036fb4448
|
7
|
+
data.tar.gz: 60e6c980020e0f7896e159594a7d505ec75b7be0b808ba1bb5214a9984a1bf5df7fa5e265322a10a477eb6507187b2d455b07b56e49289b93921884a4dc21dc1
|
@@ -7,19 +7,22 @@ module Fastlane
|
|
7
7
|
attr_accessor :task
|
8
8
|
attr_accessor :commands
|
9
9
|
attr_accessor :package_path
|
10
|
+
attr_accessor :yarn
|
10
11
|
|
11
12
|
def initialize(package_path: nil)
|
12
13
|
self.package_path = package_path
|
13
14
|
|
14
15
|
if self.package_path
|
15
|
-
|
16
|
+
self.yarn = "cd #{File.dirname(self.package_path)} && yarn"
|
17
|
+
else
|
18
|
+
self.yarn = "yarn"
|
16
19
|
end
|
17
20
|
end
|
18
21
|
|
19
22
|
# Run a certain action
|
20
23
|
def trigger(command: nil, task: nil, print_command: true, print_command_output: true)
|
21
24
|
|
22
|
-
command = [
|
25
|
+
command = [self.yarn, command, task].compact.join(" ")
|
23
26
|
Action.sh(command, print_command: print_command, print_command_output: print_command_output)
|
24
27
|
end
|
25
28
|
|
@@ -28,7 +31,7 @@ module Fastlane
|
|
28
31
|
|
29
32
|
UI.message("Checking yarn install and dependencies")
|
30
33
|
begin
|
31
|
-
Action.sh(
|
34
|
+
Action.sh(self.yarn, print_command: true, print_command_output: true)
|
32
35
|
rescue Errno::ENOENT => e
|
33
36
|
UI.error("Yarn not installed, please install with Homebrew or npm.")
|
34
37
|
raise e
|
@@ -38,8 +41,11 @@ module Fastlane
|
|
38
41
|
|
39
42
|
def check_package()
|
40
43
|
UI.message("Checking for valid package.json")
|
41
|
-
|
44
|
+
|
45
|
+
if self.package_path.nil?
|
42
46
|
package_path = 'package.json'
|
47
|
+
else
|
48
|
+
package_path = self.package_path
|
43
49
|
end
|
44
50
|
|
45
51
|
unless File.exists?(package_path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-yarn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lesch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|