@expo/build-tools 1.0.77 → 1.0.78
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.
- package/dist/steps/functionGroups/build.js +8 -4
- package/dist/steps/functionGroups/build.js.map +1 -1
- package/dist/steps/functions/runFastlane.js +31 -11
- package/dist/steps/functions/runFastlane.js.map +1 -1
- package/dist/steps/functions/runGradle.js +27 -7
- package/dist/steps/functions/runGradle.js.map +1 -1
- package/dist/steps/utils/slackMessageDynamicFields.d.ts +9 -0
- package/dist/steps/utils/slackMessageDynamicFields.js +15 -0
- package/dist/steps/utils/slackMessageDynamicFields.js.map +1 -0
- package/package.json +4 -4
|
@@ -66,6 +66,7 @@ function createStepsForIosSimulatorBuild({ globalCtx, buildToolsContext, }) {
|
|
|
66
66
|
throw_if_not_configured: false,
|
|
67
67
|
},
|
|
68
68
|
});
|
|
69
|
+
const runFastlane = (0, runFastlane_1.runFastlaneFunction)();
|
|
69
70
|
return [
|
|
70
71
|
(0, checkout_1.createCheckoutBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
71
72
|
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
@@ -73,7 +74,7 @@ function createStepsForIosSimulatorBuild({ globalCtx, buildToolsContext, }) {
|
|
|
73
74
|
installPods,
|
|
74
75
|
configureEASUpdate,
|
|
75
76
|
(0, generateGymfileFromTemplate_1.generateGymfileFromTemplateFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
76
|
-
(
|
|
77
|
+
runFastlane.createBuildStepFromFunctionCall(globalCtx, { id: runFastlane.id }),
|
|
77
78
|
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx),
|
|
78
79
|
];
|
|
79
80
|
}
|
|
@@ -99,6 +100,7 @@ function createStepsForIosBuildWithCredentials({ globalCtx, buildToolsContext, }
|
|
|
99
100
|
credentials: '${ eas.job.secrets.buildCredentials }',
|
|
100
101
|
},
|
|
101
102
|
});
|
|
103
|
+
const runFastlane = (0, runFastlane_1.runFastlaneFunction)();
|
|
102
104
|
return [
|
|
103
105
|
(0, checkout_1.createCheckoutBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
104
106
|
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
@@ -110,7 +112,7 @@ function createStepsForIosBuildWithCredentials({ globalCtx, buildToolsContext, }
|
|
|
110
112
|
(0, configureIosCredentials_1.configureIosCredentialsFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
111
113
|
(0, configureIosVersion_1.configureIosVersionFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
112
114
|
generateGymfile,
|
|
113
|
-
(
|
|
115
|
+
runFastlane.createBuildStepFromFunctionCall(globalCtx, { id: runFastlane.id }),
|
|
114
116
|
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx),
|
|
115
117
|
];
|
|
116
118
|
}
|
|
@@ -120,12 +122,13 @@ function createStepsForAndroidBuildWithoutCredentials({ globalCtx, buildToolsCon
|
|
|
120
122
|
throw_if_not_configured: false,
|
|
121
123
|
},
|
|
122
124
|
});
|
|
125
|
+
const runGradle = (0, runGradle_1.runGradleFunction)();
|
|
123
126
|
return [
|
|
124
127
|
(0, checkout_1.createCheckoutBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
125
128
|
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
126
129
|
(0, prebuild_1.createPrebuildBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
127
130
|
configureEASUpdate,
|
|
128
|
-
(
|
|
131
|
+
runGradle.createBuildStepFromFunctionCall(globalCtx, { id: runGradle.id }),
|
|
129
132
|
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx),
|
|
130
133
|
];
|
|
131
134
|
}
|
|
@@ -135,6 +138,7 @@ function createStepsForAndroidBuildWithCredentials({ globalCtx, buildToolsContex
|
|
|
135
138
|
throw_if_not_configured: false,
|
|
136
139
|
},
|
|
137
140
|
});
|
|
141
|
+
const runGradle = (0, runGradle_1.runGradleFunction)();
|
|
138
142
|
return [
|
|
139
143
|
(0, checkout_1.createCheckoutBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
140
144
|
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
@@ -143,7 +147,7 @@ function createStepsForAndroidBuildWithCredentials({ globalCtx, buildToolsContex
|
|
|
143
147
|
configureEASUpdate,
|
|
144
148
|
(0, injectAndroidCredentials_1.injectAndroidCredentialsFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
145
149
|
(0, configureAndroidVersion_1.configureAndroidVersionFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
146
|
-
(
|
|
150
|
+
runGradle.createBuildStepFromFunctionCall(globalCtx, { id: runGradle.id }),
|
|
147
151
|
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx),
|
|
148
152
|
];
|
|
149
153
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/steps/functionGroups/build.ts"],"names":[],"mappings":";;;AAAA,uCAAoF;AACpF,uDAA+C;AAE/C,oDAAoE;AACpE,wEAAwF;AACxF,oDAAoE;AACpE,0DAA0E;AAC1E,8FAAmG;AACnG,0FAA+F;AAC/F,0DAA+D;AAC/D,0FAA0G;AAE1G,wIAA2I;AAC3I,sGAA2G;AAC3G,kFAAuF;AACvF,sDAA2D;AAC3D,0EAA+E;AAC/E,oFAAyF;AACzF,kFAAuF;AAOvF,SAAg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,uBAAuB,EAAE,KAAK;SAC/B;KACF,CAAC,CAAC;IACL,OAAO;QACL,IAAA,sCAA2B,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QACxE,IAAA,0DAAqC,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAClF,IAAA,6GAAwD,EACtD,iBAAiB,CAClB,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAC5C,IAAA,sCAA2B,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QACxE,kBAAkB;QAClB,IAAA,2DAAgC,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAC7E,IAAA,yDAA+B,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAC5E,IAAA,6BAAiB,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAC9D,IAAA,4EAA8C,EAC5C,iBAAiB,CAClB,CAAC,+BAA+B,CAAC,SAAS,CAAC;KAC7C,CAAC;AACJ,CAAC","sourcesContent":["import { BuildFunctionGroup, BuildStep, BuildStepGlobalContext } from '@expo/steps';\nimport { Platform } from '@expo/eas-build-job';\n\nimport { createCheckoutBuildFunction } from '../functions/checkout';\nimport { createInstallNodeModulesBuildFunction } from '../functions/installNodeModules';\nimport { createPrebuildBuildFunction } from '../functions/prebuild';\nimport { createInstallPodsBuildFunction } from '../functions/installPods';\nimport { configureEASUpdateIfInstalledFunction } from '../functions/configureEASUpdateIfInstalled';\nimport { generateGymfileFromTemplateFunction } from '../functions/generateGymfileFromTemplate';\nimport { runFastlaneFunction } from '../functions/runFastlane';\nimport { createFindAndUploadBuildArtifactsBuildFunction } from '../functions/findAndUploadBuildArtifacts';\nimport { CustomBuildContext } from '../../customBuildContext';\nimport { createGetCredentialsForBuildTriggeredByGithubIntegration } from '../functions/getCredentialsForBuildTriggeredByGitHubIntegration';\nimport { resolveAppleTeamIdFromCredentialsFunction } from '../functions/resolveAppleTeamIdFromCredentials';\nimport { configureIosCredentialsFunction } from '../functions/configureIosCredentials';\nimport { runGradleFunction } from '../functions/runGradle';\nimport { configureIosVersionFunction } from '../functions/configureIosVersion';\nimport { injectAndroidCredentialsFunction } from '../functions/injectAndroidCredentials';\nimport { configureAndroidVersionFunction } from '../functions/configureAndroidVersion';\n\ninterface HelperFunctionsInput {\n globalCtx: BuildStepGlobalContext;\n buildToolsContext: CustomBuildContext;\n}\n\nexport function createEasBuildBuildFunctionGroup(\n buildToolsContext: CustomBuildContext\n): BuildFunctionGroup {\n return new BuildFunctionGroup({\n namespace: 'eas',\n id: 'build',\n createBuildStepsFromFunctionGroupCall: (globalCtx) => {\n if (buildToolsContext.job.platform === Platform.IOS) {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n if (buildToolsContext.job.simulator || !buildToolsContext.job.secrets?.buildCredentials) {\n return createStepsForIosSimulatorBuild({\n globalCtx,\n buildToolsContext,\n });\n } else {\n return createStepsForIosBuildWithCredentials({\n globalCtx,\n buildToolsContext,\n });\n }\n } else {\n if (!buildToolsContext.job.secrets?.buildCredentials) {\n return createStepsForAndroidBuildWithoutCredentials({\n globalCtx,\n buildToolsContext,\n });\n } else {\n return createStepsForAndroidBuildWithCredentials({\n globalCtx,\n buildToolsContext,\n });\n }\n }\n },\n });\n}\n\nfunction createStepsForIosSimulatorBuild({\n globalCtx,\n buildToolsContext,\n}: HelperFunctionsInput): BuildStep[] {\n const installPods = createInstallPodsBuildFunction().createBuildStepFromFunctionCall(globalCtx, {\n workingDirectory: './ios',\n });\n const configureEASUpdate =\n configureEASUpdateIfInstalledFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n throw_if_not_configured: false,\n },\n });\n return [\n createCheckoutBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createInstallNodeModulesBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createPrebuildBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n installPods,\n configureEASUpdate,\n generateGymfileFromTemplateFunction().createBuildStepFromFunctionCall(globalCtx),\n runFastlaneFunction().createBuildStepFromFunctionCall(globalCtx),\n createFindAndUploadBuildArtifactsBuildFunction(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n ];\n}\n\nfunction createStepsForIosBuildWithCredentials({\n globalCtx,\n buildToolsContext,\n}: HelperFunctionsInput): BuildStep[] {\n const resolveAppleTeamIdFromCredentials =\n resolveAppleTeamIdFromCredentialsFunction().createBuildStepFromFunctionCall(globalCtx, {\n id: 'resolve_apple_team_id_from_credentials',\n });\n const prebuildStep = createPrebuildBuildFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n apple_team_id: '${ steps.resolve_apple_team_id_from_credentials.apple_team_id }',\n },\n });\n const installPods = createInstallPodsBuildFunction().createBuildStepFromFunctionCall(globalCtx, {\n workingDirectory: './ios',\n });\n const configureEASUpdate =\n configureEASUpdateIfInstalledFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n throw_if_not_configured: false,\n },\n });\n const generateGymfile = generateGymfileFromTemplateFunction().createBuildStepFromFunctionCall(\n globalCtx,\n {\n callInputs: {\n credentials: '${ eas.job.secrets.buildCredentials }',\n },\n }\n );\n return [\n createCheckoutBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createInstallNodeModulesBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createGetCredentialsForBuildTriggeredByGithubIntegration(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n resolveAppleTeamIdFromCredentials,\n prebuildStep,\n installPods,\n configureEASUpdate,\n configureIosCredentialsFunction().createBuildStepFromFunctionCall(globalCtx),\n configureIosVersionFunction().createBuildStepFromFunctionCall(globalCtx),\n generateGymfile,\n runFastlaneFunction().createBuildStepFromFunctionCall(globalCtx),\n createFindAndUploadBuildArtifactsBuildFunction(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n ];\n}\n\nfunction createStepsForAndroidBuildWithoutCredentials({\n globalCtx,\n buildToolsContext,\n}: HelperFunctionsInput): BuildStep[] {\n const configureEASUpdate =\n configureEASUpdateIfInstalledFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n throw_if_not_configured: false,\n },\n });\n return [\n createCheckoutBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createInstallNodeModulesBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createPrebuildBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n configureEASUpdate,\n runGradleFunction().createBuildStepFromFunctionCall(globalCtx),\n createFindAndUploadBuildArtifactsBuildFunction(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n ];\n}\n\nfunction createStepsForAndroidBuildWithCredentials({\n globalCtx,\n buildToolsContext,\n}: HelperFunctionsInput): BuildStep[] {\n const configureEASUpdate =\n configureEASUpdateIfInstalledFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n throw_if_not_configured: false,\n },\n });\n return [\n createCheckoutBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createInstallNodeModulesBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createGetCredentialsForBuildTriggeredByGithubIntegration(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n createPrebuildBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n configureEASUpdate,\n injectAndroidCredentialsFunction().createBuildStepFromFunctionCall(globalCtx),\n configureAndroidVersionFunction().createBuildStepFromFunctionCall(globalCtx),\n runGradleFunction().createBuildStepFromFunctionCall(globalCtx),\n createFindAndUploadBuildArtifactsBuildFunction(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n ];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/steps/functionGroups/build.ts"],"names":[],"mappings":";;;AAAA,uCAAoF;AACpF,uDAA+C;AAE/C,oDAAoE;AACpE,wEAAwF;AACxF,oDAAoE;AACpE,0DAA0E;AAC1E,8FAAmG;AACnG,0FAA+F;AAC/F,0DAA+D;AAC/D,0FAA0G;AAE1G,wIAA2I;AAC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BAAkB;QAClB,SAAS,CAAC,+BAA+B,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC;QAC1E,IAAA,4EAA8C,EAC5C,iBAAiB,CAClB,CAAC,+BAA+B,CAAC,SAAS,CAAC;KAC7C,CAAC;AACJ,CAAC;AAED,SAAS,yCAAyC,CAAC,EACjD,SAAS,EACT,iBAAiB,GACI;IACrB,MAAM,kBAAkB,GACtB,IAAA,qEAAqC,GAAE,CAAC,+BAA+B,CAAC,SAAS,EAAE;QACjF,UAAU,EAAE;YACV,uBAAuB,EAAE,KAAK;SAC/B;KACF,CAAC,CAAC;IACL,MAAM,SAAS,GAAG,IAAA,6BAAiB,GAAE,CAAC;IACtC,OAAO;QACL,IAAA,sCAA2B,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QACxE,IAAA,0DAAqC,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAClF,IAAA,6GAAwD,EACtD,iBAAiB,CAClB,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAC5C,IAAA,sCAA2B,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QACxE,kBAAkB;QAClB,IAAA,2DAAgC,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAC7E,IAAA,yDAA+B,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;QAC5E,SAAS,CAAC,+BAA+B,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC;QAC1E,IAAA,4EAA8C,EAC5C,iBAAiB,CAClB,CAAC,+BAA+B,CAAC,SAAS,CAAC;KAC7C,CAAC;AACJ,CAAC","sourcesContent":["import { BuildFunctionGroup, BuildStep, BuildStepGlobalContext } from '@expo/steps';\nimport { Platform } from '@expo/eas-build-job';\n\nimport { createCheckoutBuildFunction } from '../functions/checkout';\nimport { createInstallNodeModulesBuildFunction } from '../functions/installNodeModules';\nimport { createPrebuildBuildFunction } from '../functions/prebuild';\nimport { createInstallPodsBuildFunction } from '../functions/installPods';\nimport { configureEASUpdateIfInstalledFunction } from '../functions/configureEASUpdateIfInstalled';\nimport { generateGymfileFromTemplateFunction } from '../functions/generateGymfileFromTemplate';\nimport { runFastlaneFunction } from '../functions/runFastlane';\nimport { createFindAndUploadBuildArtifactsBuildFunction } from '../functions/findAndUploadBuildArtifacts';\nimport { CustomBuildContext } from '../../customBuildContext';\nimport { createGetCredentialsForBuildTriggeredByGithubIntegration } from '../functions/getCredentialsForBuildTriggeredByGitHubIntegration';\nimport { resolveAppleTeamIdFromCredentialsFunction } from '../functions/resolveAppleTeamIdFromCredentials';\nimport { configureIosCredentialsFunction } from '../functions/configureIosCredentials';\nimport { runGradleFunction } from '../functions/runGradle';\nimport { configureIosVersionFunction } from '../functions/configureIosVersion';\nimport { injectAndroidCredentialsFunction } from '../functions/injectAndroidCredentials';\nimport { configureAndroidVersionFunction } from '../functions/configureAndroidVersion';\n\ninterface HelperFunctionsInput {\n globalCtx: BuildStepGlobalContext;\n buildToolsContext: CustomBuildContext;\n}\n\nexport function createEasBuildBuildFunctionGroup(\n buildToolsContext: CustomBuildContext\n): BuildFunctionGroup {\n return new BuildFunctionGroup({\n namespace: 'eas',\n id: 'build',\n createBuildStepsFromFunctionGroupCall: (globalCtx) => {\n if (buildToolsContext.job.platform === Platform.IOS) {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n if (buildToolsContext.job.simulator || !buildToolsContext.job.secrets?.buildCredentials) {\n return createStepsForIosSimulatorBuild({\n globalCtx,\n buildToolsContext,\n });\n } else {\n return createStepsForIosBuildWithCredentials({\n globalCtx,\n buildToolsContext,\n });\n }\n } else {\n if (!buildToolsContext.job.secrets?.buildCredentials) {\n return createStepsForAndroidBuildWithoutCredentials({\n globalCtx,\n buildToolsContext,\n });\n } else {\n return createStepsForAndroidBuildWithCredentials({\n globalCtx,\n buildToolsContext,\n });\n }\n }\n },\n });\n}\n\nfunction createStepsForIosSimulatorBuild({\n globalCtx,\n buildToolsContext,\n}: HelperFunctionsInput): BuildStep[] {\n const installPods = createInstallPodsBuildFunction().createBuildStepFromFunctionCall(globalCtx, {\n workingDirectory: './ios',\n });\n const configureEASUpdate =\n configureEASUpdateIfInstalledFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n throw_if_not_configured: false,\n },\n });\n const runFastlane = runFastlaneFunction();\n return [\n createCheckoutBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createInstallNodeModulesBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createPrebuildBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n installPods,\n configureEASUpdate,\n generateGymfileFromTemplateFunction().createBuildStepFromFunctionCall(globalCtx),\n runFastlane.createBuildStepFromFunctionCall(globalCtx, { id: runFastlane.id }),\n createFindAndUploadBuildArtifactsBuildFunction(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n ];\n}\n\nfunction createStepsForIosBuildWithCredentials({\n globalCtx,\n buildToolsContext,\n}: HelperFunctionsInput): BuildStep[] {\n const resolveAppleTeamIdFromCredentials =\n resolveAppleTeamIdFromCredentialsFunction().createBuildStepFromFunctionCall(globalCtx, {\n id: 'resolve_apple_team_id_from_credentials',\n });\n const prebuildStep = createPrebuildBuildFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n apple_team_id: '${ steps.resolve_apple_team_id_from_credentials.apple_team_id }',\n },\n });\n const installPods = createInstallPodsBuildFunction().createBuildStepFromFunctionCall(globalCtx, {\n workingDirectory: './ios',\n });\n const configureEASUpdate =\n configureEASUpdateIfInstalledFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n throw_if_not_configured: false,\n },\n });\n const generateGymfile = generateGymfileFromTemplateFunction().createBuildStepFromFunctionCall(\n globalCtx,\n {\n callInputs: {\n credentials: '${ eas.job.secrets.buildCredentials }',\n },\n }\n );\n const runFastlane = runFastlaneFunction();\n return [\n createCheckoutBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createInstallNodeModulesBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createGetCredentialsForBuildTriggeredByGithubIntegration(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n resolveAppleTeamIdFromCredentials,\n prebuildStep,\n installPods,\n configureEASUpdate,\n configureIosCredentialsFunction().createBuildStepFromFunctionCall(globalCtx),\n configureIosVersionFunction().createBuildStepFromFunctionCall(globalCtx),\n generateGymfile,\n runFastlane.createBuildStepFromFunctionCall(globalCtx, { id: runFastlane.id }),\n createFindAndUploadBuildArtifactsBuildFunction(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n ];\n}\n\nfunction createStepsForAndroidBuildWithoutCredentials({\n globalCtx,\n buildToolsContext,\n}: HelperFunctionsInput): BuildStep[] {\n const configureEASUpdate =\n configureEASUpdateIfInstalledFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n throw_if_not_configured: false,\n },\n });\n const runGradle = runGradleFunction();\n return [\n createCheckoutBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createInstallNodeModulesBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createPrebuildBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n configureEASUpdate,\n runGradle.createBuildStepFromFunctionCall(globalCtx, { id: runGradle.id }),\n createFindAndUploadBuildArtifactsBuildFunction(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n ];\n}\n\nfunction createStepsForAndroidBuildWithCredentials({\n globalCtx,\n buildToolsContext,\n}: HelperFunctionsInput): BuildStep[] {\n const configureEASUpdate =\n configureEASUpdateIfInstalledFunction().createBuildStepFromFunctionCall(globalCtx, {\n callInputs: {\n throw_if_not_configured: false,\n },\n });\n const runGradle = runGradleFunction();\n return [\n createCheckoutBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createInstallNodeModulesBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n createGetCredentialsForBuildTriggeredByGithubIntegration(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n createPrebuildBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n configureEASUpdate,\n injectAndroidCredentialsFunction().createBuildStepFromFunctionCall(globalCtx),\n configureAndroidVersionFunction().createBuildStepFromFunctionCall(globalCtx),\n runGradle.createBuildStepFromFunctionCall(globalCtx, { id: runGradle.id }),\n createFindAndUploadBuildArtifactsBuildFunction(\n buildToolsContext\n ).createBuildStepFromFunctionCall(globalCtx),\n ];\n}\n"]}
|
|
@@ -3,22 +3,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runFastlaneFunction = void 0;
|
|
4
4
|
const steps_1 = require("@expo/steps");
|
|
5
5
|
const fastlane_1 = require("../utils/ios/fastlane");
|
|
6
|
+
const slackMessageDynamicFields_1 = require("../utils/slackMessageDynamicFields");
|
|
6
7
|
function runFastlaneFunction() {
|
|
7
8
|
return new steps_1.BuildFunction({
|
|
8
9
|
namespace: 'eas',
|
|
9
10
|
id: 'run_fastlane',
|
|
10
11
|
name: 'Run fastlane',
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
outputProviders: [
|
|
13
|
+
steps_1.BuildStepOutput.createProvider({
|
|
14
|
+
id: slackMessageDynamicFields_1.BuildStepOutputName.STATUS_TEXT,
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
steps_1.BuildStepOutput.createProvider({
|
|
18
|
+
id: slackMessageDynamicFields_1.BuildStepOutputName.ERROR_TEXT,
|
|
19
|
+
required: false,
|
|
20
|
+
}),
|
|
21
|
+
],
|
|
22
|
+
fn: async (stepCtx, { env, outputs }) => {
|
|
23
|
+
outputs[slackMessageDynamicFields_1.BuildStepOutputName.STATUS_TEXT].set(slackMessageDynamicFields_1.BuildStatusText.STARTED);
|
|
24
|
+
try {
|
|
25
|
+
await (0, fastlane_1.runFastlaneGym)({
|
|
26
|
+
workingDir: stepCtx.workingDirectory,
|
|
27
|
+
env: Object.keys(env).reduce((acc, key) => {
|
|
28
|
+
var _a;
|
|
29
|
+
acc[key] = (_a = env[key]) !== null && _a !== void 0 ? _a : '';
|
|
30
|
+
return acc;
|
|
31
|
+
}, {}),
|
|
32
|
+
logger: stepCtx.logger,
|
|
33
|
+
buildLogsDirectory: stepCtx.global.buildLogsDirectory,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
outputs[slackMessageDynamicFields_1.BuildStepOutputName.STATUS_TEXT].set(slackMessageDynamicFields_1.BuildStatusText.ERROR);
|
|
38
|
+
outputs[slackMessageDynamicFields_1.BuildStepOutputName.ERROR_TEXT].set(error.toString());
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
outputs[slackMessageDynamicFields_1.BuildStepOutputName.STATUS_TEXT].set(slackMessageDynamicFields_1.BuildStatusText.SUCCESS);
|
|
22
42
|
},
|
|
23
43
|
});
|
|
24
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runFastlane.js","sourceRoot":"","sources":["../../../src/steps/functions/runFastlane.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"runFastlane.js","sourceRoot":"","sources":["../../../src/steps/functions/runFastlane.ts"],"names":[],"mappings":";;;AAAA,uCAA6D;AAE7D,oDAAuD;AACvD,kFAA0F;AAE1F,SAAgB,mBAAmB;IACjC,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,cAAc;QACpB,eAAe,EAAE;YACf,uBAAe,CAAC,cAAc,CAAC;gBAC7B,EAAE,EAAE,+CAAmB,CAAC,WAAW;gBACnC,QAAQ,EAAE,IAAI;aACf,CAAC;YACF,uBAAe,CAAC,cAAc,CAAC;gBAC7B,EAAE,EAAE,+CAAmB,CAAC,UAAU;gBAClC,QAAQ,EAAE,KAAK;aAChB,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;YACtC,OAAO,CAAC,+CAAmB,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,2CAAe,CAAC,OAAO,CAAC,CAAC;YACtE,IAAI,CAAC;gBACH,MAAM,IAAA,yBAAc,EAAC;oBACnB,UAAU,EAAE,OAAO,CAAC,gBAAgB;oBACpC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAC1B,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;;wBACX,GAAG,CAAC,GAAG,CAAC,GAAG,MAAA,GAAG,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC;wBAC1B,OAAO,GAAG,CAAC;oBACb,CAAC,EACD,EAA4B,CAC7B;oBACD,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB;iBACtD,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,+CAAmB,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,2CAAe,CAAC,KAAK,CAAC,CAAC;gBACpE,OAAO,CAAC,+CAAmB,CAAC,UAAU,CAAC,CAAC,GAAG,CAAE,KAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACzE,MAAM,KAAK,CAAC;YACd,CAAC;YACD,OAAO,CAAC,+CAAmB,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,2CAAe,CAAC,OAAO,CAAC,CAAC;QACxE,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAtCD,kDAsCC","sourcesContent":["import { BuildFunction, BuildStepOutput } from '@expo/steps';\n\nimport { runFastlaneGym } from '../utils/ios/fastlane';\nimport { BuildStatusText, BuildStepOutputName } from '../utils/slackMessageDynamicFields';\n\nexport function runFastlaneFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'run_fastlane',\n name: 'Run fastlane',\n outputProviders: [\n BuildStepOutput.createProvider({\n id: BuildStepOutputName.STATUS_TEXT,\n required: true,\n }),\n BuildStepOutput.createProvider({\n id: BuildStepOutputName.ERROR_TEXT,\n required: false,\n }),\n ],\n fn: async (stepCtx, { env, outputs }) => {\n outputs[BuildStepOutputName.STATUS_TEXT].set(BuildStatusText.STARTED);\n try {\n await runFastlaneGym({\n workingDir: stepCtx.workingDirectory,\n env: Object.keys(env).reduce(\n (acc, key) => {\n acc[key] = env[key] ?? '';\n return acc;\n },\n {} as Record<string, string>\n ),\n logger: stepCtx.logger,\n buildLogsDirectory: stepCtx.global.buildLogsDirectory,\n });\n } catch (error) {\n outputs[BuildStepOutputName.STATUS_TEXT].set(BuildStatusText.ERROR);\n outputs[BuildStepOutputName.ERROR_TEXT].set((error as Error).toString());\n throw error;\n }\n outputs[BuildStepOutputName.STATUS_TEXT].set(BuildStatusText.SUCCESS);\n },\n });\n}\n"]}
|
|
@@ -9,6 +9,7 @@ const assert_1 = __importDefault(require("assert"));
|
|
|
9
9
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
10
10
|
const steps_1 = require("@expo/steps");
|
|
11
11
|
const gradle_1 = require("../utils/android/gradle");
|
|
12
|
+
const slackMessageDynamicFields_1 = require("../utils/slackMessageDynamicFields");
|
|
12
13
|
function runGradleFunction() {
|
|
13
14
|
return new steps_1.BuildFunction({
|
|
14
15
|
namespace: 'eas',
|
|
@@ -21,16 +22,35 @@ function runGradleFunction() {
|
|
|
21
22
|
allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
|
|
22
23
|
}),
|
|
23
24
|
],
|
|
24
|
-
|
|
25
|
+
outputProviders: [
|
|
26
|
+
steps_1.BuildStepOutput.createProvider({
|
|
27
|
+
id: slackMessageDynamicFields_1.BuildStepOutputName.STATUS_TEXT,
|
|
28
|
+
required: true,
|
|
29
|
+
}),
|
|
30
|
+
steps_1.BuildStepOutput.createProvider({
|
|
31
|
+
id: slackMessageDynamicFields_1.BuildStepOutputName.ERROR_TEXT,
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
34
|
+
],
|
|
35
|
+
fn: async (stepCtx, { env, inputs, outputs }) => {
|
|
36
|
+
outputs[slackMessageDynamicFields_1.BuildStepOutputName.STATUS_TEXT].set(slackMessageDynamicFields_1.BuildStatusText.STARTED);
|
|
25
37
|
(0, assert_1.default)(stepCtx.global.staticContext.job, 'Job is required');
|
|
26
38
|
(0, assert_1.default)(stepCtx.global.staticContext.job.platform === eas_build_job_1.Platform.ANDROID, 'This function is only available when building for Android');
|
|
27
39
|
const command = (0, gradle_1.resolveGradleCommand)(stepCtx.global.staticContext.job, inputs.command.value);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
try {
|
|
41
|
+
await (0, gradle_1.runGradleCommand)({
|
|
42
|
+
logger: stepCtx.logger,
|
|
43
|
+
gradleCommand: command,
|
|
44
|
+
androidDir: path_1.default.join(stepCtx.workingDirectory, 'android'),
|
|
45
|
+
env,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
outputs[slackMessageDynamicFields_1.BuildStepOutputName.STATUS_TEXT].set(slackMessageDynamicFields_1.BuildStatusText.ERROR);
|
|
50
|
+
outputs[slackMessageDynamicFields_1.BuildStepOutputName.ERROR_TEXT].set(error.toString());
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
outputs[slackMessageDynamicFields_1.BuildStepOutputName.STATUS_TEXT].set(slackMessageDynamicFields_1.BuildStatusText.SUCCESS);
|
|
34
54
|
},
|
|
35
55
|
});
|
|
36
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runGradle.js","sourceRoot":"","sources":["../../../src/steps/functions/runGradle.ts"],"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B,EAClC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,EAChC,MAAM,CAAC,OAAO,CAAC,KAA2B,CAC3C,CAAC;YACF,IAAI,CAAC;gBACH,MAAM,IAAA,yBAAgB,EAAC;oBACrB,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,aAAa,EAAE,OAAO;oBACtB,UAAU,EAAE,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC;oBAC1D,GAAG;iBACJ,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,+CAAmB,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,2CAAe,CAAC,KAAK,CAAC,CAAC;gBACpE,OAAO,CAAC,+CAAmB,CAAC,UAAU,CAAC,CAAC,GAAG,CAAE,KAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACzE,MAAM,KAAK,CAAC;YACd,CAAC;YACD,OAAO,CAAC,+CAAmB,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,2CAAe,CAAC,OAAO,CAAC,CAAC;QACxE,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAhDD,8CAgDC","sourcesContent":["import path from 'path';\nimport assert from 'assert';\n\nimport { Platform } from '@expo/eas-build-job';\nimport {\n BuildFunction,\n BuildStepInput,\n BuildStepInputValueTypeName,\n BuildStepOutput,\n} from '@expo/steps';\n\nimport { resolveGradleCommand, runGradleCommand } from '../utils/android/gradle';\nimport { BuildStatusText, BuildStepOutputName } from '../utils/slackMessageDynamicFields';\n\nexport function runGradleFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'run_gradle',\n name: 'Run gradle',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'command',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n outputProviders: [\n BuildStepOutput.createProvider({\n id: BuildStepOutputName.STATUS_TEXT,\n required: true,\n }),\n BuildStepOutput.createProvider({\n id: BuildStepOutputName.ERROR_TEXT,\n required: false,\n }),\n ],\n fn: async (stepCtx, { env, inputs, outputs }) => {\n outputs[BuildStepOutputName.STATUS_TEXT].set(BuildStatusText.STARTED);\n assert(stepCtx.global.staticContext.job, 'Job is required');\n assert(\n stepCtx.global.staticContext.job.platform === Platform.ANDROID,\n 'This function is only available when building for Android'\n );\n const command = resolveGradleCommand(\n stepCtx.global.staticContext.job,\n inputs.command.value as string | undefined\n );\n try {\n await runGradleCommand({\n logger: stepCtx.logger,\n gradleCommand: command,\n androidDir: path.join(stepCtx.workingDirectory, 'android'),\n env,\n });\n } catch (error) {\n outputs[BuildStepOutputName.STATUS_TEXT].set(BuildStatusText.ERROR);\n outputs[BuildStepOutputName.ERROR_TEXT].set((error as Error).toString());\n throw error;\n }\n outputs[BuildStepOutputName.STATUS_TEXT].set(BuildStatusText.SUCCESS);\n },\n });\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BuildStatusText = exports.BuildStepOutputName = void 0;
|
|
4
|
+
var BuildStepOutputName;
|
|
5
|
+
(function (BuildStepOutputName) {
|
|
6
|
+
BuildStepOutputName["STATUS_TEXT"] = "status_text";
|
|
7
|
+
BuildStepOutputName["ERROR_TEXT"] = "error_text";
|
|
8
|
+
})(BuildStepOutputName || (exports.BuildStepOutputName = BuildStepOutputName = {}));
|
|
9
|
+
var BuildStatusText;
|
|
10
|
+
(function (BuildStatusText) {
|
|
11
|
+
BuildStatusText["SUCCESS"] = "SUCCESS";
|
|
12
|
+
BuildStatusText["ERROR"] = "ERROR";
|
|
13
|
+
BuildStatusText["STARTED"] = "STARTED";
|
|
14
|
+
})(BuildStatusText || (exports.BuildStatusText = BuildStatusText = {}));
|
|
15
|
+
//# sourceMappingURL=slackMessageDynamicFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slackMessageDynamicFields.js","sourceRoot":"","sources":["../../../src/steps/utils/slackMessageDynamicFields.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,kDAA2B,CAAA;IAC3B,gDAAyB,CAAA;AAC3B,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;IACf,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B","sourcesContent":["export enum BuildStepOutputName {\n STATUS_TEXT = 'status_text',\n ERROR_TEXT = 'error_text',\n}\n\nexport enum BuildStatusText {\n SUCCESS = 'SUCCESS',\n ERROR = 'ERROR',\n STARTED = 'STARTED',\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/build-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.78",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"@expo/config": "8.5.4",
|
|
25
25
|
"@expo/config-plugins": "7.8.4",
|
|
26
26
|
"@expo/downloader": "1.0.57",
|
|
27
|
-
"@expo/eas-build-job": "1.0.
|
|
27
|
+
"@expo/eas-build-job": "1.0.78",
|
|
28
28
|
"@expo/env": "^0.0.5",
|
|
29
29
|
"@expo/logger": "1.0.57",
|
|
30
30
|
"@expo/package-manager": "1.1.2",
|
|
31
31
|
"@expo/plist": "^0.0.20",
|
|
32
|
-
"@expo/steps": "1.0.
|
|
32
|
+
"@expo/steps": "1.0.78",
|
|
33
33
|
"@expo/template-file": "1.0.57",
|
|
34
34
|
"@expo/turtle-spawn": "1.0.57",
|
|
35
35
|
"@expo/xcpretty": "^4.3.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"node": "20.11.0",
|
|
70
70
|
"yarn": "1.22.21"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "fa930165725445581c94af24bb29e9f454a681f7"
|
|
73
73
|
}
|