diff --git a/packages/commonwealth/server/scripts/validate-external-api-versioning.ts b/packages/commonwealth/server/scripts/validate-external-api-versioning.ts index 6b99b421691..5ab40138242 100644 --- a/packages/commonwealth/server/scripts/validate-external-api-versioning.ts +++ b/packages/commonwealth/server/scripts/validate-external-api-versioning.ts @@ -137,6 +137,10 @@ async function validateExternalApiVersioning() { ? parseSemVer(newOas.info.version) : parseSemVer(process.argv[2]); + console.log( + `Files downloaded and versions parsed. \nNew Version: ${newVersion}\nOld Version: ${oldVersion}`, + ); + if (oldVersion.major < newVersion.major) { if (newVersion.minor !== 0 || newVersion.patch !== 0) { const newMajorVersion = `${newVersion.major}.0.0`; @@ -145,6 +149,7 @@ async function validateExternalApiVersioning() { `Bumped OAS version from ${readableVersion(oldVersion)} to ${newMajorVersion}`, ); } + console.log('Major version already bumped.'); return; // Breaking change, this is valid regardless of schema changes } @@ -161,6 +166,7 @@ async function validateExternalApiVersioning() { }, }); await Promise.all([unlink(productionOasPath), unlink(localOasPath)]); + console.log('OpenAPI spec diff:', result); if (result.breakingDifferencesFound) { throw Error('External API has breaking changes, update the Major version');