%{?nodejs_find_provides_and_requires} %global packagename conventional-recommended-bump # Tests time out in mock, likely due to lack of network access %global enable_tests 0 Name: nodejs-conventional-recommended-bump Version: 2.0.8 Release: 1%{?dist} Summary: Get a recommended version bump based on conventional commits License: MIT URL: https://github.com/conventional-changelog/conventional-recommended-bump Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # Tests Source1: https://raw.githubusercontent.com/conventional-changelog/conventional-changelog/%{packagename}%40%{version}/packages/%{packagename}/index.spec.js Source2: https://raw.githubusercontent.com/conventional-changelog/conventional-changelog/%{packagename}%40%{version}/packages/%{packagename}/preset-resolver.spec.js ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(concat-stream) BuildRequires: npm(conventional-commits-filter) BuildRequires: npm(conventional-commits-parser) BuildRequires: npm(conventional-changelog-preset-loader) BuildRequires: npm(git-raw-commits) BuildRequires: npm(git-semver-tags) BuildRequires: npm(object-assign) BuildRequires: npm(q) %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(better-than-before) BuildRequires: npm(core-assert) BuildRequires: npm(mkdirp) BuildRequires: npm(shelljs) BuildRequires: npm(temp) %endif %description Get a recommended version bump based on conventional commits %prep %autosetup -n package -p1 cp -p %{SOURCE1} . cp -p %{SOURCE2} . sed -i '1s/env //' cli.js %if 0%{?enable_tests} %nodejs_fixdep mocha %endif %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json index.js cli.js preset-resolver.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha -R spec *.spec.js --timeout=30000 %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc README.md CHANGELOG.md %license LICENSE.md %{nodejs_sitelib}/%{packagename} %changelog * Tue Mar 27 2018 jsmith - 2.0.8-1 - Update to upstream 2.0.8 release * Wed Feb 21 2018 Jared Smith - 2.0.5-1 - Update to upstream 2.0.5 release * Sun May 7 2017 Jared Smith - 1.0.0-1 - Initial packaging