Replace explicit version of npm in %%check with variable and make build fail if it doesn't match

This commit is contained in:
Zuzana Svetlikova 2022-02-09 12:18:48 +01:00
parent e752a0f3a7
commit 7770565953
1 changed files with 5 additions and 2 deletions

View File

@ -25,7 +25,7 @@
# This is used by both the nodejs package and the npm subpackage that
# has a separate version - the name is special so that rpmdev-bumpspec
# will bump this rather than adding .1 to the end.
%global baserelease 1
%global baserelease 2
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
@ -619,7 +619,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require(
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')"
# Ensure we have npm and that the version matches
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/npm version --json |jq '. | select(.npm | contains("7.24.0"))'
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/npm version --json |jq -e '.npm == "%{npm_version}"'
# Make sure i18n support is working
NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/node_modules/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node --icu-data-dir=%{buildroot}%{icudatadir} %{SOURCE2}
@ -730,6 +730,9 @@ end
%changelog
* Wed Feb 09 2022 Zuzana Svetlikova <zsvetlik@redhat.com> - 1:16.14.0-2
- Replace explicit version of npm in %%check with variable and make build fail if it doesn't match
* Tue Feb 08 2022 Stephen Gallagher <sgallagh@redhat.com> - 1:16.14.0-1
- Update to Node.js 16.14.0