UNPKG

@releaseotto/core

Version:

OTTO performs your action on new versioning of APIs, packages, schemas, etc. Keepings things nice and neatly automated.

22 lines 990 B
import { LocationType } from "../types/automator/LocationType"; import * as path from 'path'; import { cloneRepository } from "../commands/git"; import { temporaryLocation } from "./globals"; export function fetchLocation(config) { var _a, _b; const location = config.location; if (location !== undefined) { if (((_a = config.location) === null || _a === void 0 ? void 0 : _a.type) === LocationType.GITHUB) { const githubLocation = (_b = config.location) === null || _b === void 0 ? void 0 : _b.config; const ghLocation = path.resolve(temporaryLocation, githubLocation.repo); cloneRepository({ branch: githubLocation.branch, repository: githubLocation.repo, toLocation: ghLocation }); return path.resolve(ghLocation, githubLocation.metaMinusLocation); } } throw new Error("Unable to find defined location"); } //# sourceMappingURL=location.js.map