-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFastfile
96 lines (84 loc) · 3.15 KB
/
Fastfile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
lane :sample_bump_version_update_changelog_create_pr_action do |options|
bump_version_update_changelog_create_pr(
current_version: 'current_version_number',
next_version: 'new_sdk_version',
changelog_latest_path: './path-to/CHANGELOG.latest.md',
changelog_path: './path-to/CHANGELOG.md',
files_to_update: ['./file-containing-version-1.txt', './file-containing-version-2.rb'],
files_to_update_without_prerelease_modifiers: [],
repo_name: 'repo-name',
github_pr_token: 'github-api-token', # This can also be obtained from ENV GITHUB_PULL_REQUEST_API_TOKEN
github_token: 'github-token',
github_rate_limit: 0,
editor: 'vim'
)
end
lane :sample_replace_version_number_action do |options|
replace_version_number(
current_version: 'current_version_number',
new_version_number: 'new_version_number',
files_to_update: ['./file-containing-version-1.txt', './file-containing-version-2.rb'],
files_to_update_without_prerelease_modifiers: []
)
end
lane :sample_create_next_snapshot_version_action do |options|
create_next_snapshot_version(
current_version: 'current_version_number',
repo_name: 'repo-name',
github_pr_token: 'github-api-token', # This can also be obtained from ENV GITHUB_PULL_REQUEST_API_TOKEN
files_to_update: ['./file-containing-version-1.txt', './file-containing-version-2.rb'],
files_to_update_without_prerelease_modifiers: []
)
end
lane :sample_create_github_release_action do |options|
create_github_release(
version: 'release_version_number',
repo_name: 'repo-name',
github_api_token: 'github-api-token', # This can also be obtained from ENV RC_INTERNAL_GITHUB_TOKEN
changelog_latest_path: './path-to/CHANGELOG.latest.md',
upload_assets: ['./file-to-upload.txt', './file-to-upload-2.rb']
)
end
lane :sample_replace_text_in_files_action do |options|
replace_text_in_files(
previous_text: 'previous text',
new_text: 'new text',
paths_of_files_to_update: ['./test-file1.txt', './test-file2.rb']
)
end
lane :sample_commit_current_changes_action do |options|
commit_current_changes(
commit_message: 'Sample commit message'
)
end
lane :sample_get_latest_github_release_within_same_major_action do |options|
get_latest_github_release_within_same_major(
repo_name: 'repo-name',
current_version: 'current_version_number'
)
end
lane :sample_update_hybrids_versions_file_action do |options|
update_hybrids_versions_file(
versions_file_path: './sample-path-to-VERSIONS.md',
new_sdk_version: 'new-version-of-version-of-sdk',
hybrid_common_version: 'phc-version'
)
end
lane :sample_determine_next_version_using_labels_action do |options|
determine_next_version_using_labels(
repo_name: 'repo-name',
github_token: 'github-token',
github_rate_limit: 0,
current_version: 'current_version_number'
)
end
lane :sample_flaky_test do
test_artifact_path = File.absolute_path('./test_output/xctest/ios')
scan_with_flaky_test_retries(
project: './test_projects/FlakyTests/FlakyTests.xcodeproj',
output_types: 'junit',
output_directory: test_artifact_path,
result_bundle: true,
number_of_flaky_retries: 5
)
end