The Node.js ABI version is now represented by the NODE_MODULE_VERSION

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2023-03-10 10:09:57 -05:00
parent 5079b893be
commit 0cd3fed400
No known key found for this signature in database
GPG Key ID: 45DB85A568286D11

View File

@ -1,14 +1,8 @@
#!/bin/bash
# Get the version from the default Node.js
full_version=$(/usr/bin/node --version)
# Trim off the leading 'v'
full_version=${full_version:1}
# Get the different version components
split_version=(${full_version//\./ })
# Get the ABI version
abi_version=$(/usr/bin/node -p process.versions.modules)
# Write out the Virtual Requires
echo "nodejs(abi${split_version[0]}) >= ${split_version[0]}.${split_version[1]}"
echo "nodejs(abi) = ${abi_version}"