@@ -29986,8 +29986,12 @@ const getTestStatus = (uploadId, apiKey, dcdVersionString, apiUrl) => __awaiter(
2998629986 return null;
2998729987 }
2998829988});
29989- const getLatestDcdVersion = () => __awaiter(void 0, void 0 , void 0, function* () {
29989+ const getLatestDcdVersion = (...args_1 ) => __awaiter(void 0, [...args_1] , void 0, function* (useBeta = false ) {
2999029990 try {
29991+ if (useBeta) {
29992+ console.info(`Using beta version of DCD CLI`);
29993+ return `${dcdPackageName}@beta`;
29994+ }
2999129995 const { output } = yield executeCommand(`npm view ${dcdPackageName} version`, false);
2999229996 const version = output.trim();
2999329997 console.info(`Latest DCD version from npm: ${version}`);
@@ -30001,8 +30005,8 @@ const getLatestDcdVersion = () => __awaiter(void 0, void 0, void 0, function* ()
3000130005const run = () => __awaiter(void 0, void 0, void 0, function* () {
3000230006 var _a;
3000330007 try {
30004- const dcdVersionString = yield getLatestDcdVersion ();
30005- const { additionalAppBinaryIds, additionalAppFiles, androidApiLevel, androidDevice, apiKey, apiUrl, appBinaryId, appFilePath, async, config, deviceLocale, downloadArtifacts, env, excludeFlows, excludeTags, googlePlay, ignoreShaCheck, includeTags, iOSVersion, iosDevice, jsonFile, maestroVersion, name, orientation, report, retry, workspaceFolder, runnerType, debug, moropoV1ApiKey, } = yield (0, params_1.getParameters)( );
30008+ const { additionalAppBinaryIds, additionalAppFiles, androidApiLevel, androidDevice, apiKey, apiUrl, appBinaryId, appFilePath, async, config, deviceLocale, downloadArtifacts, env, excludeFlows, excludeTags, googlePlay, ignoreShaCheck, includeTags, iOSVersion, iosDevice, jsonFile, maestroVersion, name, orientation, report, retry, workspaceFolder, runnerType, debug, moropoV1ApiKey, useBeta, } = yield (0, params_1.getParameters) ();
30009+ const dcdVersionString = yield getLatestDcdVersion(useBeta );
3000630010 const params = {
3000730011 'additional-app-binary-ids': additionalAppBinaryIds,
3000830012 'additional-app-files': additionalAppFiles,
@@ -30266,6 +30270,7 @@ function getParameters() {
3026630270 const moropoV1ApiKey = core.getInput('moropo-v1-api-key', {
3026730271 required: false,
3026830272 });
30273+ const useBeta = core.getInput('use-beta', { required: false }) === 'true';
3026930274 if (!(appFilePath !== '') !== (appBinaryId !== '')) {
3027030275 throw new Error('Either app-file or app-binary-id must be used');
3027130276 }
@@ -30304,6 +30309,7 @@ function getParameters() {
3030430309 jsonFile,
3030530310 debug,
3030630311 moropoV1ApiKey,
30312+ useBeta,
3030730313 };
3030830314 });
3030930315}
0 commit comments