eas-cli
Version:
EAS command line tool
57 lines (56 loc) • 2.69 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getApplicationIdentifierAsync = void 0;
const eas_build_job_1 = require("@expo/eas-build-job");
const applicationId_1 = require("./android/applicationId");
const gradle_1 = require("./android/gradle");
const bundleIdentifier_1 = require("./ios/bundleIdentifier");
const scheme_1 = require("./ios/scheme");
const target_1 = require("./ios/target");
const workflow_1 = require("./workflow");
async function getApplicationIdentifierAsync({ graphqlClient, projectDir, projectId, exp, buildProfile, platform, vcsClient, nonInteractive, env, }) {
if (platform === eas_build_job_1.Platform.ANDROID) {
const profile = buildProfile;
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID, vcsClient);
if (workflow === eas_build_job_1.Workflow.MANAGED) {
return await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)({
graphqlClient,
projectDir,
projectId,
exp,
vcsClient,
nonInteractive,
});
}
const gradleContext = await (0, gradle_1.resolveGradleBuildContextAsync)(projectDir, profile, vcsClient);
return await (0, applicationId_1.getApplicationIdAsync)(projectDir, exp, vcsClient, gradleContext);
}
else {
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS, vcsClient);
const profile = buildProfile;
if (workflow === eas_build_job_1.Workflow.MANAGED) {
return await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)({
graphqlClient,
projectDir,
projectId,
exp,
vcsClient,
nonInteractive,
});
}
const xcodeBuildContext = await (0, scheme_1.resolveXcodeBuildContextAsync)({ exp, projectDir, nonInteractive: false, vcsClient }, profile);
const targets = await (0, target_1.resolveTargetsAsync)({
projectDir,
exp,
xcodeBuildContext,
env,
vcsClient,
});
const applicationTarget = (0, target_1.findApplicationTarget)(targets);
return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient, {
targetName: applicationTarget.targetName,
buildConfiguration: applicationTarget.buildConfiguration,
});
}
}
exports.getApplicationIdentifierAsync = getApplicationIdentifierAsync;
;