UNPKG

semantic-release-dotnet

Version:

A semantic-release plugin for versioning .NET core projects.

31 lines 960 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareTest = exports.logger = void 0; const path = require("path"); const fs = require("fs"); const rimraf = require("rimraf"); exports.logger = { debug: console.debug, warn: () => { }, error: console.error, }; /** * Creates a test directory that is not checked into the build that is used to * test the functionality of the plugin. */ function prepareTest(key) { // Make sure the top-level build directory already exists. const buildPath = path.join(process.cwd(), "build"); if (!fs.existsSync(buildPath)) { fs.mkdirSync(buildPath); } // Make sure the project directory exists and is empty. const testPath = path.join(buildPath, key); if (fs.existsSync(testPath)) { rimraf.sync(testPath); } fs.mkdirSync(testPath); return testPath; } exports.prepareTest = prepareTest; //# sourceMappingURL=funcs.js.map