@@ -19,30 +19,19 @@ if (process.cwd() !== resolvePath(__dirname, '..')) {
1919// is a "pre-release" if nextVersion is premajor, preminor,
2020// prepatch, or prerelease
2121const nextVersion = prompt ( `Next version (current version is ${ getPackageVersion ( ) } )? ` )
22- const isPrerelease = nextVersion . substring ( 0 , 3 ) === 'pre'
22+ const isPrerelease = nextVersion . substr ( 0 , 3 ) === 'pre' || nextVersion . indexOf ( '-' ) !== - 1
2323
2424// 1) Make sure the tests pass
25- exec ( 'npm test -- --single-run ' )
25+ exec ( 'npm test' )
2626
2727// 2) Increment the package version in package.json
2828// 3) Create a new commit
2929// 4) Create a v* tag that points to that commit
3030exec ( `npm version ${ nextVersion } -m "Version %s"` )
3131
32- // 5) Push to the same branch on the git remote (GitHub).
33- // Do this before we publish in case anyone has pushed
34- // since we last pulled
35- exec ( 'git push origin' )
36-
37- // 6) Publish to npm. Use the "next" tag for pre-releases,
32+ // 5) Publish to npm. Use the "next" tag for pre-releases,
3833// "latest" for all others
3934exec ( `npm publish --tag ${ isPrerelease ? 'next' : 'latest' } ` )
4035
41- // 7 ) Push the v* tag to GitHub
36+ // 6 ) Push the v* tag to GitHub
4237exec ( `git push -f origin v${ getPackageVersion ( ) } ` )
43-
44- // 8) Push the "latest" tag to GitHub
45- if ( ! isPrerelease ) {
46- exec ( 'git tag -f latest' )
47- exec ( 'git push -f origin latest' )
48- }
0 commit comments