@ivoryio/ivory-cli
Version:
23 lines (22 loc) • 1.35 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.configureApp = void 0;
var shelljs_1 = __importDefault(require("shelljs"));
exports.configureApp = function (_a) {
var projectName = _a.projectName, awsProfile = _a.awsProfile, repositoryInfo = _a.repositoryInfo;
shelljs_1.default.cd(projectName);
var files = ['public/index.html', 'public/manifest.json', 'infrastructure/package.json'];
shelljs_1.default.sed('-i', 'PROJECT_NAME', projectName, files);
shelljs_1.default.sed('-i', 'PROJECT_NAME', projectName, 'infrastructure/ci_cd/app.ts');
shelljs_1.default.sed('-i', 'GIT_PROVIDER', repositoryInfo.platform, 'infrastructure/ci_cd/AmplifyStack.ts');
if (repositoryInfo.platform === 'github') {
shelljs_1.default.sed('-i', 'GITHUB_OWNER', repositoryInfo.repoOwner, 'infrastructure/ci_cd/AmplifyStack.ts');
shelljs_1.default.sed('-i', 'GITHUB_REPO', repositoryInfo.repoName, 'infrastructure/ci_cd/AmplifyStack.ts');
}
shelljs_1.default.sed('-i', 'AWS_PROFILE', awsProfile, "infrastructure/package.json");
shelljs_1.default.exec("cd infrastructure && yarn install --color always");
shelljs_1.default.exec("yarn i18n");
};