forked from fastlane/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSnapfile
More file actions
60 lines (45 loc) · 1.3 KB
/
Snapfile
File metadata and controls
60 lines (45 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
require 'fileutils'
# Uncomment the lines below you want to change by removing the # in the beginning
# A list of devices you want to take the screenshots from
devices([
"iPhone 6",
"iPhone 6 Plus",
"iPhone 5",
"iPhone 4s",
"iPad Air"
])
languages([
"de-DE",
"en-US",
"es-ES",
"fr-FR",
"it-IT",
"ja-JP",
"ko-KR",
"nl-NL",
"ru-RU",
"sv-SE",
"cmn-Hans"
])
# Where should the resulting screenshots be stored?
screenshots_path "./screenshots"
clear_previous_screenshots true
# JavaScript UIAutomation file
js_file './scripts/MindNode.js'
# The name of the project's scheme
scheme 'MindNode for iOS'
# Where is your project (or workspace)? Provide the full path here
project_path '../MindNode-iOS.xcworkspace'
example_files = './ExampleDocuments'
folder_name = "ExampleDocuments"
setup_for_device_change do |lang, device|
# This will make sure, all example documents are installed on the simulator
puts "Copying example files to .app"
app_path = "/tmp/snapshot/build/MindNode.app/"
FileUtils.mkdir_p(File.join(app_path, folder_name))
Dir.glob(File.join(example_files, '*.mindnode')).each do |example_path|
puts "Copying '#{example_path}' to .app container"
to = File.join(app_path, folder_name)
FileUtils.cp_r(example_path, to) unless File.exist?(to)
end
end