@atomist/sample-sdm
Version:
Sample Atomist automation for software delivery
36 lines • 1.62 kB
JavaScript
;
/*
* Copyright © 2018 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const sdm_1 = require("@atomist/sdm");
const machineFactory_1 = require("@atomist/sdm/machine/machineFactory");
const addAtomistHeader_1 = require("../autofix/addAtomistHeader");
const addLicenseFile_1 = require("../autofix/addLicenseFile");
const demoEditors_1 = require("../pack/demo-editors/demoEditors");
/**
* Assemble a machine that performs only autofixes.
* @return {SoftwareDeliveryMachine}
*/
function autofixMachine(configuration) {
const sdm = machineFactory_1.createSoftwareDeliveryMachine({ name: "Autofix machine", configuration }, sdm_1.onAnyPush
.setGoals(new sdm_1.Goals("Autofix", sdm_1.AutofixGoal)));
sdm
.addAutofixes(addAtomistHeader_1.AddAtomistJavaHeader, addAtomistHeader_1.AddAtomistTypeScriptHeader, addLicenseFile_1.AddLicenseFile)
.addExtensionPacks(demoEditors_1.DemoEditors);
return sdm;
}
exports.autofixMachine = autofixMachine;
//# sourceMappingURL=autofixMachine.js.map