fastlane-plugin-emerge 0.10.2 → 0.10.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5af3be7b1a251da05592383703e74d646beeffe6ed7bc50cc4e139f662332d3c
|
4
|
+
data.tar.gz: ae2179ef90e77a6916a75f0a0265d94bfd2aec7205d90ad4187d891266aba756
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4feffe8f6cc285b4d634f8140b44432194308edf6a7c46e2e62fed0674527239a30ce814bd035763444b8fa3c3e81950ab08d700c01486762a61e0cb1c693509
|
7
|
+
data.tar.gz: 943719d58ae8a684fd3bfd31b6c74c693ffc28b18d7be7945f0ed9e15d68fe39bd127545ca6090fde9678dcd24bfeeeb5382744eda6a596a354e4a2025689237
|
data/README.md
CHANGED
@@ -22,14 +22,17 @@ To get started, first obtain an [API token](https://docs.emergetools.com/docs/up
|
|
22
22
|
|
23
23
|
```ruby
|
24
24
|
platform :ios do
|
25
|
-
lane :
|
26
|
-
#
|
27
|
-
|
28
|
-
emerge()
|
25
|
+
lane :emerge_upload do
|
26
|
+
# Tip: group builds in our dashboard via the `tag` parameter
|
27
|
+
emerge(tag: 'pr_build')
|
29
28
|
end
|
30
29
|
end
|
31
30
|
```
|
32
31
|
|
32
|
+
1. Produce a build using `gym()`, `run_tests()`, or other Fastlane actions
|
33
|
+
2. When you are ready to upload to Emerge, simply call the `emerge()` action
|
34
|
+
- a. We will automatically detect the most recently built app to upload, or you can manually pass in a `file_path` parameter
|
35
|
+
|
33
36
|
For a full list of available parameters run `fastlane action emerge`.
|
34
37
|
|
35
38
|
### Snapshot Testing
|
@@ -13,11 +13,18 @@ module Fastlane
|
|
13
13
|
class EmergeAction < Action
|
14
14
|
def self.run(params)
|
15
15
|
api_token = params[:api_token]
|
16
|
-
file_path = params[:file_path] || lane_context[SharedValues::XCODEBUILD_ARCHIVE]
|
17
16
|
|
18
|
-
if file_path
|
19
|
-
|
20
|
-
|
17
|
+
file_path = if params[:file_path]
|
18
|
+
UI.message("Using input file_path: #{file_path}")
|
19
|
+
params[:file_path]
|
20
|
+
elsif lane_context[SharedValues::XCODEBUILD_ARCHIVE]
|
21
|
+
UI.message("Using XCODEBUILD_ARCHIVE path")
|
22
|
+
lane_context[SharedValues::XCODEBUILD_ARCHIVE]
|
23
|
+
else
|
24
|
+
UI.message("Falling back to searching SCAN_DERIVED_DATA_PATH")
|
25
|
+
Dir.glob("#{lane_context[SharedValues::SCAN_DERIVED_DATA_PATH]}/Build/Products/Debug-iphonesimulator/*.app").first
|
26
|
+
end
|
27
|
+
|
21
28
|
git_params = Helper::EmergeHelper.make_git_params
|
22
29
|
pr_number = params[:pr_number] || git_params.pr_number
|
23
30
|
branch = params[:branch] || git_params.branch
|
@@ -32,6 +39,8 @@ module Fastlane
|
|
32
39
|
if file_path.nil? || !File.exist?(file_path)
|
33
40
|
UI.error("Invalid input file")
|
34
41
|
return false
|
42
|
+
else
|
43
|
+
UI.message("Using file_path: #{file_path}")
|
35
44
|
end
|
36
45
|
extension = File.extname(file_path)
|
37
46
|
|
@@ -59,6 +68,7 @@ module Fastlane
|
|
59
68
|
file_path = "#{absolute_path.dirname}/archive.xcarchive.zip"
|
60
69
|
ZipAction.run(
|
61
70
|
path: "#{d}/archive.xcarchive",
|
71
|
+
symlinks: true,
|
62
72
|
output_path: file_path,
|
63
73
|
exclude: [],
|
64
74
|
include: []
|
@@ -77,6 +87,7 @@ module Fastlane
|
|
77
87
|
Helper::EmergeHelper.copy_config(config_path, file_path)
|
78
88
|
Actions::ZipAction.run(
|
79
89
|
path: file_path,
|
90
|
+
symlinks: true,
|
80
91
|
output_path: zip_path,
|
81
92
|
exclude: [],
|
82
93
|
include: []
|
@@ -8,7 +8,36 @@ module Fastlane
|
|
8
8
|
shell_command = "git rev-parse --abbrev-ref HEAD"
|
9
9
|
UI.command(shell_command)
|
10
10
|
stdout, _, status = Open3.capture3(shell_command)
|
11
|
-
|
11
|
+
unless status.success?
|
12
|
+
UI.error("Failed to get the current branch name")
|
13
|
+
return nil
|
14
|
+
end
|
15
|
+
|
16
|
+
branch_name = stdout.strip
|
17
|
+
if branch_name == "HEAD"
|
18
|
+
# We're in a detached HEAD state
|
19
|
+
# Find all branches that contains the current HEAD commit
|
20
|
+
#
|
21
|
+
# Example output:
|
22
|
+
# * (HEAD detached at dec13a5)
|
23
|
+
# telkins/detached-test
|
24
|
+
# remotes/origin/telkins/detached-test
|
25
|
+
#
|
26
|
+
# So far I've seen this output be fairly stable
|
27
|
+
# If the input is invalid for whatever reason, sed/awk will return an empty string
|
28
|
+
shell_command = "git branch -a --contains HEAD | sed -n 2p | awk '{ printf $1 }'"
|
29
|
+
UI.command(shell_command)
|
30
|
+
head_stdout, _, head_status = Open3.capture3(shell_command)
|
31
|
+
|
32
|
+
unless head_status.success?
|
33
|
+
UI.error("Failed to get the current branch name for detached HEAD")
|
34
|
+
return nil
|
35
|
+
end
|
36
|
+
|
37
|
+
branch_name = head_stdout.strip
|
38
|
+
end
|
39
|
+
|
40
|
+
branch_name == "HEAD" ? nil : branch_name
|
12
41
|
end
|
13
42
|
|
14
43
|
def self.sha
|
@@ -19,7 +48,11 @@ module Fastlane
|
|
19
48
|
end
|
20
49
|
|
21
50
|
def self.base_sha
|
22
|
-
|
51
|
+
current_branch = branch
|
52
|
+
remote_head = remote_head_branch
|
53
|
+
return nil if current_branch.nil? || remote_head.nil?
|
54
|
+
|
55
|
+
shell_command = "git merge-base #{remote_head} #{current_branch}"
|
23
56
|
UI.command(shell_command)
|
24
57
|
stdout, _, status = Open3.capture3(shell_command)
|
25
58
|
return nil if stdout.strip.empty? || !status.success?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-emerge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emerge Tools, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|