Skip to content

Commit

Permalink
debug: trim down list of versions to update
Browse files Browse the repository at this point in the history
  • Loading branch information
baparham committed Nov 23, 2023
1 parent 7549695 commit de02f83
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ node_modules

# CI generated files
collected-json
jsons
new-versions.txt
node-versions.json
total-unique-versions.txt
2 changes: 1 addition & 1 deletion scripts/get-new-node-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ const indexedVersions = Object.keys(indexedJson);
// Find the unique list of "version" keys that are in nodeJson and not in indexedJson
const uniqueVersions = nodeVersions.filter(version => !indexedVersions.includes(version));

console.log(...uniqueVersions);
console.log(uniqueVersions.join('\n'));
15 changes: 9 additions & 6 deletions scripts/nvm-iterator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ nvm install --lts
npm install -g yarn
yarn

UNIQUE_VERSIONS=$(yarn --silent ts-node -s scripts/get-new-node-versions.ts)
TOTAL_UNIQUE_VERSIONS=$(yarn --silent ts-node -s scripts/get-new-node-versions.ts)

echo Found unique versions: $UNIQUE_VERSIONS
echo "$TOTAL_UNIQUE_VERSIONS" > total-unique-versions.txt
MIN_SUPPORTED_MAJOR="18"
SUPPORTED_UNIQUE_VERSIONS=$(awk -F. "{if (\$1 >= "$MIN_SUPPORTED_MAJOR") print}" total-unique-versions.txt)
echo Found unique versions: $SUPPORTED_UNIQUE_VERSIONS

mkdir -p jsons

for version in $UNIQUE_VERSIONS; do
echo nvm install $version
echo node --version
echo node -p "JSON.stringify(process.versions)" > jsons/$version.json
for version in $SUPPORTED_UNIQUE_VERSIONS; do
nvm install $version
node --version
node -p "JSON.stringify(process.versions)" > jsons/$version.json
done

ls jsons

0 comments on commit de02f83

Please sign in to comment.