Many makefile enhancements (support for direct invocation, instructions if invoked without target, release mechanism improved), package.json scripts now invoke the makefile.
- Using `npm test` and `npm run …` scripts defined in package.json now invokes the makefile and runs the test with the same shell that npm was invoked from. - The makefile can now be invoked directly - supporting utilities from locally installed npm packages are automatically discovered. - Invoking the makefile without a target errors out with a hint. - Shell-specific test targets are now named 'test-<shell>'. - Both 'test-<shell>' targets and the all-shells 'test' target now run all test suites by default. - On `make TAG=<new-version> release` there must be no uncommitted changes. '<new-version>' can now also be one of the following increment specifiers: 'patch', 'minor', 'major'. - It is ensure that <new-version>, if not an increment specifier, is a valid semver version number that is higher than the previous release's. - The previous release tag is now located with a pattern so as to exclude tags that aren't version numbers. - Switched from lightweight to annotated tags for releases.
This commit is contained in:
15
package.json
15
package.json
@@ -6,12 +6,12 @@
|
||||
"test": "test"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "urchin test",
|
||||
"test/fast": "urchin -f test/fast",
|
||||
"test/slow": "urchin -f test/slow",
|
||||
"test/install_script": "urchin -f test/install_script",
|
||||
"test/installation": "urchin -f test/installation",
|
||||
"test/sourcing": "urchin -f test/sourcing"
|
||||
"test": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make test-$shell",
|
||||
"test/fast": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell",
|
||||
"test/slow": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=slow test-$shell",
|
||||
"test/install_script": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=install_script test-$shell",
|
||||
"test/installation": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation test-$shell",
|
||||
"test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -30,7 +30,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/creationix/nvm",
|
||||
"devDependencies": {
|
||||
"replace": "~0.3.0",
|
||||
"semver": "~4.1.0",
|
||||
"urchin": "~0.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user