UNPKG

@veecode-platform/safira-cli

Version:

Generate a microservice project from your spec.

19 lines (18 loc) 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GithubActions = void 0; const generate_file_1 = require("../generate-file"); const file_system_utils_1 = require("../../../utils/file-system-utils"); class GithubActions extends generate_file_1.GenerateFileTemplate { create(projectPath, framework, branch, packManager) { const serviceTemplates = file_system_utils_1.FileSystemUtils.buildPath(generate_file_1.GenerateFileTemplate.templatesFolder, "java", framework, "github", packManager); const templateMustache = file_system_utils_1.FileSystemUtils.buildPath(serviceTemplates, "build.yml.mustache"); const pipelineFolder = file_system_utils_1.FileSystemUtils.buildPath(projectPath, ".github", "workflows"); file_system_utils_1.FileSystemUtils.createFolder(pipelineFolder); const params = {}; const pipelineFile = file_system_utils_1.FileSystemUtils.buildPath(pipelineFolder, "build.yml"); if (!file_system_utils_1.FileSystemUtils.exists(pipelineFile)) super.writeFile(pipelineFile, templateMustache, params); } } exports.GithubActions = GithubActions;