Skip to content

fix travis badges bug #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .githooks/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const fs = require('fs');
const path = require('path');
const installHooks = () => {
const hooks = [
'post-checkout',
// 'post-merge'
];
for (const hook in hooks) {
const src = path.resolve(`.githooks/${hooks[hook]}`);
const dest = path.resolve(`.git/hooks/${hooks[hook]}`);
if (fs.existsSync(dest)) {
console.log(`${hooks[hook]} exists`);
continue;
}
try {
fs.copyFileSync(src, dest);
console.log(`${hooks[hook]} hook copied`);
fs.access(dest, fs.constants.X_OK, function(err) {
err && fs.chmodSync(dest, 0755);
});
console.log(`${hooks[hook]} hook installed.`)
return 0;
} catch (err) {
console.error(`error installing ${hooks[hook]} hook`);
console.error(err);
}
}
}
installHooks();
15 changes: 15 additions & 0 deletions .githooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
#

if [ "$3" -eq 0 ]
then
exit
fi

BRANCH_NAME=$(git symbolic-ref --short -q HEAD)
NUM_CHECKOUTS=$(git reflog --date=local | grep -o ${BRANCH_NAME} | wc -l)

if [ "$NUM_CHECKOUTS" -eq 1 ]
then
node ./scripts/update-readme.js
fi
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
<!-- npm package verson and downloads info can be included once the package is published -->
<!-- [![npm version](https://badge.fury.io/js/react-lite-ui.svg)](https://badge.fury.io/js/react-lite-ui) -->
<!-- [![npm downloads](https://img.shields.io/npm/dm/react-lite-ui.svg)](https://www.npmjs.com/package/react-lite-ui) -->
<!-- AUTO-GENERATED-CONTENT:START (travisBadgePlugin:src=./scripts/travis-template&addNewLine=false) -->
[![Dependencies](https://img.shields.io/david/Codebrahma/react-lite-ui.svg)](https://david-dm.org/Codebrahma/react-lite-ui)
[![devDependencies](https://img.shields.io/david/dev/Codebrahma/react-lite-ui.svg)](https://david-dm.org/Codebrahma/react-lite-ui?type=dev)
[![Travis (.org)](https://img.shields.io/travis/Codebrahma/react-lite-ui.svg)](https://travis-ci.org/Codebrahma/react-lite-ui)
[![Travis (.org)](https://img.shields.io/travis/Codebrahma/react-lite-ui/travis_badge_fix.svg)](https://travis-ci.org/Codebrahma/react-lite-ui)

[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Codebrahma/react-lite-ui.svg)](https://github.com/Codebrahma/react-lite-ui/)
[![codecov](https://codecov.io/gh/Codebrahma/react-lite-ui/branch/development/graph/badge.svg)](https://codecov.io/gh/Codebrahma/react-lite-ui)
[![codecov](https://codecov.io/gh/Codebrahma/react-lite-ui/branch/travis_badge_fix/graph/badge.svg)](https://codecov.io/gh/Codebrahma/react-lite-ui)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2286/badge)](https://bestpractices.coreinfrastructure.org/projects/2286)

[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/Codebrahma/react-lite-ui.svg)](http://isitmaintained.com/project/Codebrahma/react-lite-ui)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
<!-- AUTO-GENERATED-CONTENT:END -->


Set of components which can be customizable / themeable and extendable.
Expand Down
Loading