%{?nodejs_find_provides_and_requires} %global packagename git-semver-tags # Tests run fine locally, but timeout in mock, most likely due to network # restrictions %global enable_tests 0 Name: nodejs-git-semver-tags Version: 1.3.3 Release: 1%{?dist} Summary: Get all git semver tags of your repository in reverse chronological order License: MIT URL: https://github.com/stevemao/git-semver-tags Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. Source1: https://raw.githubusercontent.com/conventional-changelog/conventional-changelog/%{packagename}%40%{version}/packages/%{packagename}/test.js # License Source2: LICENSE-MIT-stevemao.txt ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(meow) BuildRequires: npm(semver) %if 0%{?enable_tests} BuildRequires: git BuildRequires: mocha BuildRequires: npm(git-dummy-commit) BuildRequires: npm(shelljs) %endif %description Get all git semver tags of your repository in reverse chronological order %prep %autosetup -n package -p1 # setup the tests cp -p %{SOURCE1} . cp -p %{SOURCE2} . sed -i '1s/env //' cli.js %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json index.js cli.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc README.md CHANGELOG.md %license LICENSE-MIT-stevemao.txt %{nodejs_sitelib}/%{packagename} %changelog * Wed Feb 21 2018 Jared Smith - 1.3.3-1 - Update to upstream 1.3.3 release * Sat May 6 2017 Jared Smith - 1.2.0-1 - Initial packaging