UNPKG

@sap/cds-dk

Version:

Command line client and development toolkit for the SAP Cloud Application Programming Model

23 lines (19 loc) 904 B
const cds = require('../../../cds') const { exists, rimraf } = cds.utils const { readProject } = require('../../projectReader'); const { merge } = require('../../merge') const term = require('../../../../lib/util/term') // cds10: Remove this and all usages of addContainerize/hasContainerize module.exports = class ContainerizeTemplate extends require('../../plugin') { static hasInProduction () { return exists('containerize.yaml') } async run() { console.warn(term.warn(`The "cds add containerize" command is deprecated and will be removed in the next major release. Please use the "cds add kyma" command instead.`)) if (cds.cli.options.force) { await rimraf('containerize.yaml') } const project = readProject() await merge(__dirname, '../kyma/files/containerize.yaml.hbs').into('containerize.yaml', { with: project }) } }