You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
3.5 KiB
102 lines
3.5 KiB
import { ImplementationResourceReader } from "./ImplementationResourceReader.js";
|
|
import { ImplementationResource } from "./ImplementationResource.js";
|
|
import { ExternalComponentResource } from "./ExternalComponentResource.js";
|
|
import { ExternalComponent } from "./types.js";
|
|
// import { svnPropGet, svnList, svnGetLatestTag, } from "./svn.js";
|
|
|
|
// const baseUrl = 'https://svn.bearingpointcaribbean.com';
|
|
// const url = '/svn/MBS_ANGUILLA/trunk';
|
|
|
|
async function deploymentCheck() {
|
|
const reader = new ImplementationResourceReader();
|
|
const implementationResources = await reader.load(true, true);
|
|
|
|
implementationResources.forEach(
|
|
async (implementationResource: ImplementationResource) => {
|
|
const collectionOfComponentToBeTagged: ExternalComponentResource[] =
|
|
await implementationResource.deploymentCheck();
|
|
console.log(collectionOfComponentToBeTagged);
|
|
}
|
|
);
|
|
}
|
|
|
|
// async function start() {
|
|
// svnList(baseUrl, url)
|
|
// .then((listResult) => {
|
|
// console.log("Success:", listResult);
|
|
// return svnPropGet("svn:externals", baseUrl, url);
|
|
// })
|
|
// .then((propGetResult) => {
|
|
// const payload: string = propGetResult.properties.target[0].property[0]._;
|
|
// console.log("Second result:", JSON.stringify(payload, null, 2));
|
|
// })
|
|
// .catch((error) => {
|
|
// console.error("Error:", error);
|
|
// });
|
|
// }
|
|
|
|
// async function start2() {
|
|
// const listResult = await svnList(baseUrl, url);
|
|
// console.log("listResult", listResult);
|
|
|
|
// const propGetResult = await svnPropGet("svn:externals", baseUrl, url);
|
|
// console.log("propGetResult", JSON.stringify(propGetResult, null, 2));
|
|
|
|
// const svnGetLatestTagResult = await svnGetLatestTag(baseUrl, url);
|
|
// console.log(
|
|
// "svnGetLatestTagResult",
|
|
// JSON.stringify(svnGetLatestTagResult, null, 2)
|
|
// );
|
|
// }
|
|
|
|
// async function start3() {
|
|
// const solutionImplementationReader = new SolutionImplementationReader();
|
|
// solutionImplementationReader.solutionImplementations.forEach(
|
|
// (solutionImplementation: TypeSolutionImplementation) => {
|
|
// console.log(solutionImplementation.customer);
|
|
// }
|
|
// );
|
|
// }
|
|
|
|
// async function start4() {
|
|
// const currentSolution = new SolutionImplementation(baseUrl, url);
|
|
// await currentSolution.getLatestVersion(DirType.tags);
|
|
// const externalsCollection = await currentSolution.getExternals();
|
|
// if (externalsCollection) {
|
|
// await Promise.all(
|
|
// externalsCollection.map(async (externalComponent) => {
|
|
// // const output = `${externalComponent.componentName()} => ${externalComponent.typeAndVersion()}`;
|
|
// // console.log("Latest external:", output);
|
|
// // console.log(
|
|
// // "Externalcomponent.parent:",
|
|
// // externalComponent.getParentSolutionImplementation()
|
|
// // );
|
|
// console.log(
|
|
// `${externalComponent.componentName()}: this verison: ${externalComponent.version()}, next minor: ${await externalComponent.getNextVersion(
|
|
// DirType.tags,
|
|
// 'minor'
|
|
// )}, next major: ${await externalComponent.getNextVersion(
|
|
// DirType.tags,
|
|
// 'major'
|
|
// )}`
|
|
// );
|
|
// })
|
|
// );
|
|
// }
|
|
|
|
// // externalComponents.forEach((externalComponent: ExternalComponent) => {
|
|
// // const currentExternal = new SolutionImplementation(
|
|
// // baseUrl,
|
|
// // externalComponent.path
|
|
// // );
|
|
// // console.log(currentExternal);
|
|
// // });
|
|
// // console.log(await currentSolution.getExternals());
|
|
// }
|
|
|
|
//start();
|
|
//start2();
|
|
//start3();
|
|
// start4();
|
|
deploymentCheck();
|