UNPKG

@veecode-platform/safira-cli

Version:

Generate a microservice project from your spec.

24 lines (23 loc) 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GradlePackage = void 0; const file_system_utils_1 = require("../../utils/file-system-utils"); const command_execute_1 = require("../../command/command-execute"); class GradlePackage { async package(options) { const params = []; if (options.skipTests) params.push("-x test"); if (options.quarkusBuiltinImage) params.push("-Dquarkus.container-image.build=true"); if (options.quarkusBuiltinImagePublish) { params.push("-Dquarkus.container-image.push=true", `-Dquarkus.container-image.registry=${options.registry.registry}`, `-Dquarkus.container-image.group=${options.registry.username}`, `-Dquarkus.container-image.username=${options.registry.username}`, `-Dquarkus.container-image.password=${options.registry.password}`); } const gradlew = file_system_utils_1.FileSystemUtils.buildPath(options.projectPath, "gradlew"); await command_execute_1.CommandExecute.instance.exec(`${gradlew} build ${params.join(" ")}`.replace(/\s+/g, " ").trim()); } name() { return "GradlePackage"; } } exports.GradlePackage = GradlePackage;