Skip to content

Commit

Permalink
ci: remove nodejs v12 exclusion logic from run custom checks
Browse files Browse the repository at this point in the history
Fixes hyperledger#1961

Signed-off-by: Youngone Lee <youngone.lee@accenture.com>
  • Loading branch information
Leeyoungone authored and zondervancalvez committed May 18, 2022
1 parent 2763941 commit 2d4876a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
10 changes: 0 additions & 10 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,6 @@ function mainTask()

yarn run configure

# Obtains the major NodeJS version such as "12" from "v12.14.1"
# We only run the custom checks above v12 because the globby dependency's
# latest version is forcing us to use Ecmascript Modules which do not work
# on NodeJS 12 even with the additional flags passed in.
nodejs_version=`node --version | awk -v range=1 '{print substr($0,range+1,2)}'`
if [ "$nodejs_version" -gt "12" ]; then
echo "$(date +%FT%T%z) [CI] NodeJS is newer than v12, running custom checks..."
yarn run custom-checks
fi

yarn tools:validate-bundle-names

dumpDiskUsageInfo
Expand Down
7 changes: 1 addition & 6 deletions tools/custom-checks/run-custom-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ export async function runCustomChecks(
let overallSuccess = true;
let overallErrors: string[] = [];

const [majorVersion] = version.split(".");
const nodeV12OrOlder = parseInt(majorVersion) <= 12;
if (nodeV12OrOlder) {
console.log(`${TAG} Checks skipped due to old NodeJS (v${version}) OK.`);
return;
}
console.log("${TAG} Current NodeJS version is v", version);

{
const [success, errors] = await checkOpenApiJsonSpecs({ argv, env });
Expand Down

0 comments on commit 2d4876a

Please sign in to comment.