1.1.0-3-catch-no-git-3e7758c5655b71b60cbfc5309f7dbbafab683076 • Published 7 years ago

catch-uncommitted v1.1.0-3-catch-no-git-3e7758c5655b71b60cbfc5309f7dbbafab683076

Weekly downloads
3,731
License
Apache-2.0
Repository
github
Last release
7 years ago

Catch-Uncommitted

A simple sh script to error if you have uncommitted or unversioned files in your current directory.

This is designed to be used in your CI process, if you have some generated build output committed, to ensure that it's up to date. Run your build, then run this script, and it'll fail if there's any new or changed files that appear.

Checks for new files using git, so this won't complain git ignored files change.

This depends on /bin/sh pointing to a sensible shell, and on git and tee being available in your $PATH.

Get started

Install it:

npm install --save-dev catch-uncommitted

Add it to your CI script in package.json:

"scripts": {
    "ci": "npm run build && catch-uncommitted"
}

Run it:

npm run ci

[... your build here ...]

No unexpected changes, all good.

Extra options

--catch-no-git

When running catch-uncommitted --catch-no-git, the script will exit without an error when git isn't available. This can be useful when you need to run the same tests in different environments, where some of them do not have git available.

2.0.0

5 years ago

1.6.2

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

8 years ago