fastlane-plugin-yarn 0.1.1 → 0.2.0

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: 02b77e17cbab91378ba015a58aa80e321f76c4fb
4
- data.tar.gz: 20a196476fd75a4c69f9286e430c7d78358386b1
3
+ metadata.gz: ea40ff23d9ab2da8db798eaf3b3f8f33149ea552
4
+ data.tar.gz: 5dd44bf531d90eb39ee589d09eaef6bad655295a
5
5
  SHA512:
6
- metadata.gz: a9340eb0a364b8264a6ad7a000ecd670682e0994dc39758594c5ec6d70a9c6d5360b11d39f4e1017d672f2067a0faab9dbb2597efa1488dbb078a08d8c796ebc
7
- data.tar.gz: be97381e369f4e341d271a1616a3319ab938b5ccd5fde03a613f88d79543467d3480ae3a71d35f51910bc51e0a203de7b40182bd75f7cc543ba53425278a9dab
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
- Dir.chdir(File.dirname(self.package_path))
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 = ["yarn", command, task].compact.join(" ")
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("yarn", print_command: true, print_command_output: true)
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
- unless self.package_path.nil?
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)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Yarn
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.1
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-21 00:00:00.000000000 Z
11
+ date: 2016-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry