-
Notifications
You must be signed in to change notification settings - Fork 14
/
editBundleIdentifier.js
42 lines (40 loc) · 1.13 KB
/
editBundleIdentifier.js
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
const runCommand = require('../runCommand');
function revertActionModifications() {
return runCommand({
command: [
'mv',
['.envCopy', '.env'],
{ cwd: `${process.cwd()}/${this.projectName}/ios/fastlane/config` }
],
context: this.options
}).then(() =>
runCommand({
command: [
'mv',
['project_name_copy', 'project_name.rb'],
{ cwd: `${process.cwd()}/${this.projectName}/ios/fastlane/actions` }
],
context: this.options
})
);
}
module.exports = function editBundleIdentifier() {
return runCommand({
command: [
'bundle',
[
'exec',
'fastlane',
'ios',
'update_bundle_identifier',
`project_name:${this.projectName}`,
`bundle_identifier:${this.bundleId}`
],
{ cwd: `${process.cwd()}/${this.projectName}/ios` }
],
loadingMessage: 'Updating bundle identifier...',
successMessage: 'Bundle identifier updated!',
failureMessage: 'Bundle identifier update failed. Turn verbose mode on for detailed logging',
context: this.options
}).then(() => revertActionModifications.bind(this)());
};