fastlane-plugin-shorebird 0.3.0 → 0.4.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
  SHA256:
3
- metadata.gz: 9b036de6c7699f4fdd2c1f3a5babe877e11f1820a747233a28ad4b30300f3e06
4
- data.tar.gz: 74f912f946184dfbc6d9afb04ef9753cfa2ab44ab8fb66dc65a3548485b6a191
3
+ metadata.gz: 3598208825af69bed26dcbc75b64a7ece57ee3e1a4c885a834520e515f6123b6
4
+ data.tar.gz: dabb3fe9f66621470cae27a1ac0d64e6ca76b1c08a22920838e1e88ae924eb31
5
5
  SHA512:
6
- metadata.gz: c719fdb1f7859c6730e4f4e0a113fec5f852e6ee0af577000d97c0601ade818046a3a18eda8b47cb43d64ce3aab3b3c420f2e7f137121bc5c59eb18847dd589c
7
- data.tar.gz: cde015fcf74a485e2ce5ed66fb07f356bbe0c9bbd9389e1c8b4191643e9e66af2d6f60e92eb17531752522a1ab220a0b9398c11bd6a91c457273dfee458dbe3c
6
+ metadata.gz: 44b9996afb7fa9b27d57541846dbfe723311f3557cdcc23613c1306217fd1cb3cb1fd798c3b5516a1af83a8cfa5997cae89254160d46be9fb04434900e94d5ca
7
+ data.tar.gz: 34113a2a2371db314f16c5ecdfd57c84244397d2a451fe90ac6029aa3b8747687b278ec7735731af895cf17a8f866622d5d21ebc6339e8f328406a34c2aee4d5
@@ -32,12 +32,31 @@ module Fastlane
32
32
  end
33
33
 
34
34
  def self.most_recent_ipa_file
35
- Dir.glob('../build/ios/ipa/*.ipa')
36
- .sort_by! { |f| File.stat(f).ctime }
35
+ Dir.glob(ipa_path_pattern)
36
+ .sort_by! { |f| File.stat(f).mtime }
37
37
  .reverse!
38
38
  .first
39
39
  end
40
40
 
41
+ # Traverses up the directory tree until it finds a pubspec.yaml file.
42
+ # If no parent directory contains a pubspec.yaml file, we assume we are
43
+ # not in a Flutter project and raise an error.
44
+ def self.project_root
45
+ current_dir = Dir.pwd
46
+ current_dir = File.expand_path('..', current_dir) until File.exist?(File.join(current_dir, 'pubspec.yaml')) || (current_dir == '/')
47
+ # If we've reached the root directory, we've failed to find a pubspec.yaml file.
48
+ if current_dir == '/'
49
+ raise "Could not find pubspec.yaml in the directory tree"
50
+ end
51
+
52
+ current_dir
53
+ end
54
+
55
+ # .ipa path relative to the project root
56
+ def self.ipa_path_pattern
57
+ File.join(project_root, 'build/ios/ipa', '*.ipa')
58
+ end
59
+
41
60
  def self.export_options_plist_in_args?(params)
42
61
  params[:args].include?("--export-options-plist")
43
62
  end
@@ -13,7 +13,7 @@ module Fastlane
13
13
  export_options_hash = {}
14
14
  if export_options.kind_of?(Hash)
15
15
  export_options_hash = export_options
16
- export_options_hash[:method] = "app-store"
16
+ export_options_hash[:method] ||= "app-store"
17
17
  if provisioning_profile_mapping
18
18
  # If match has provided provisioning profiles, put them in the export options plist
19
19
  export_options_hash[:provisioningProfiles] = provisioning_profile_mapping
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Shorebird
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-shorebird
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shorebird