Skip to content

Commit 5884f5d

Browse files
committed
v3.4.1
1 parent eefeb52 commit 5884f5d

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

Instabug.podspec

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
1-
Pod::Installer::UserProjectIntegrator::TargetIntegrator.class_eval do
2-
unless method_defined?(:integrate_with_instabug!)
1+
Pod::Spec.new do |s|
2+
Pod::Installer::UserProjectIntegrator::TargetIntegrator.class_eval do
3+
unless method_defined?(:integrate_with_instabug!)
34

4-
INSTABUG_PHASE_NAME = "Upload Instabug dSYM"
5-
INSTABUG_PHASE_SCRIPT = <<'END'
6-
# SKIP_SIMULATOR_BUILDS=1
7-
SCRIPT_SRC=$(find "$PROJECT_DIR" -name 'Instabug_dsym_upload.sh')
8-
if [ ! "${SCRIPT_SRC}" ]; then
9-
echo "Instabug: err: script not found. Make sure that you're including Instabug.bundle in your project directory"
10-
exit 1
11-
fi
12-
source "${SCRIPT_SRC}"
13-
END
5+
INSTABUG_PHASE_NAME = "Upload Instabug dSYM"
6+
INSTABUG_PHASE_SCRIPT = <<'END'
7+
# SKIP_SIMULATOR_BUILDS=1
8+
SCRIPT_SRC=$(find "$PROJECT_DIR" -name 'Instabug_dsym_upload.sh')
9+
if [ ! "${SCRIPT_SRC}" ]; then
10+
echo "Instabug: err: script not found. Make sure that you're including Instabug.bundle in your project directory"
11+
exit 1
12+
fi
13+
source "${SCRIPT_SRC}"
14+
END
1415
15-
def integrate_with_instabug!
16-
integrate_without_instabug!
17-
return if instabug_native_targets.empty?
18-
UI.section("Integrating with Instabug") do
19-
add_instabug_upload_script_phase
20-
user_project.save
16+
def integrate_with_instabug!
17+
integrate_without_instabug!
18+
return if instabug_native_targets.empty?
19+
UI.section("Integrating with Instabug") do
20+
add_instabug_upload_script_phase
21+
user_project.save
22+
end
2123
end
22-
end
2324
24-
alias integrate_without_instabug! integrate!
25-
alias integrate! integrate_with_instabug!
25+
alias integrate_without_instabug! integrate!
26+
alias integrate! integrate_with_instabug!
2627
27-
def add_instabug_upload_script_phase
28-
instabug_native_targets.each do |native_target|
29-
phase = native_target.shell_script_build_phases.select{ |bp| bp.name == INSTABUG_PHASE_NAME }.first ||
30-
native_target.new_shell_script_build_phase(INSTABUG_PHASE_NAME)
28+
def add_instabug_upload_script_phase
29+
instabug_native_targets.each do |native_target|
30+
phase = native_target.shell_script_build_phases.select{ |bp| bp.name == INSTABUG_PHASE_NAME }.first ||
31+
native_target.new_shell_script_build_phase(INSTABUG_PHASE_NAME)
3132
32-
phase.shell_path = "/bin/sh"
33-
phase.shell_script = INSTABUG_PHASE_SCRIPT
34-
phase.show_env_vars_in_log = '0'
33+
phase.shell_path = "/bin/sh"
34+
phase.shell_script = INSTABUG_PHASE_SCRIPT
35+
phase.show_env_vars_in_log = '0'
36+
end
3537
end
36-
end
3738
38-
def instabug_native_targets
39-
@instabug_native_targets ||=(
40-
target_uuids = target.user_target_uuids
41-
native_targets = target_uuids.map do |uuid|
42-
native_target = user_project.objects_by_uuid[uuid]
43-
unless native_target
44-
raise Informative, "[Error] Unable to find the target with " \
45-
"the `#{uuid}` UUID for the `#{target}` integration library"
39+
def instabug_native_targets
40+
@instabug_native_targets ||=(
41+
target_uuids = target.user_target_uuids
42+
native_targets = target_uuids.map do |uuid|
43+
native_target = user_project.objects_by_uuid[uuid]
44+
unless native_target
45+
raise Informative, "[Error] Unable to find the target with " \
46+
"the `#{uuid}` UUID for the `#{target}` integration library"
47+
end
48+
native_target
4649
end
47-
native_target
48-
end
4950
50-
native_targets.reject do |native_target|
51-
native_target.shell_script_build_phases.any? do |bp|
52-
bp.name == INSTABUG_PHASE_NAME && bp.shell_script == INSTABUG_PHASE_SCRIPT
51+
native_targets.reject do |native_target|
52+
native_target.shell_script_build_phases.any? do |bp|
53+
bp.name == INSTABUG_PHASE_NAME && bp.shell_script == INSTABUG_PHASE_SCRIPT
54+
end
5355
end
54-
end
55-
)
56+
)
57+
end
5658
end
5759
end
58-
end
59-
60-
Pod::Spec.new do |s|
60+
6161
s.name = "Instabug"
6262
s.version = "3.4"
6363
s.summary = "Bug reporting for mobile apps. Learn more at http://instabug.com"

0 commit comments

Comments
 (0)