mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a8a4f9029 |
@@ -1,9 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## Newer releases
|
||||
|
||||
Please see: https://github.com/bower/bower/releases
|
||||
|
||||
## 1.8.0 - 2016-11-07
|
||||
|
||||
- Download tar archives from GitHub when possible (#2263)
|
||||
|
||||
63
Gruntfile.js
63
Gruntfile.js
@@ -75,8 +75,53 @@ module.exports = function(grunt) {
|
||||
'publish',
|
||||
'Perform final checks and publish Bower',
|
||||
function() {
|
||||
var npmVersion = JSON.parse(
|
||||
childProcess.execSync('npm version --json').toString()
|
||||
).npm.split('.');
|
||||
var npmMajor = parseInt(npmVersion[0], 10);
|
||||
var npmMinor = parseInt(npmVersion[1], 10);
|
||||
|
||||
var jsonPackage = require('./package');
|
||||
|
||||
if (npmMajor !== 3 || npmMinor < 5) {
|
||||
grunt.log.writeln(
|
||||
'You need to use at least npm@3.5 to publish bower.'
|
||||
);
|
||||
grunt.log.writeln(
|
||||
'It is because npm 2.x produces too long paths that Windows does not handle.'
|
||||
);
|
||||
grunt.log.writeln('Please upgrade it: npm install -g npm');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var version = jsonPackage.version;
|
||||
var changelog = fs.readFileSync('./CHANGELOG.md');
|
||||
|
||||
if (changelog.indexOf('## ' + version) === -1) {
|
||||
grunt.log.writeln(
|
||||
'Please add changelog.md entry for this bower version (' +
|
||||
version +
|
||||
')'
|
||||
);
|
||||
|
||||
var lastRelease = childProcess
|
||||
.execSync('git tag | tail -1')
|
||||
.toString()
|
||||
.trim();
|
||||
|
||||
grunt.log.writeln(
|
||||
'Commits since last release (' + lastRelease + '): \n'
|
||||
);
|
||||
|
||||
grunt.log.writeln(
|
||||
childProcess
|
||||
.execSync('git log --oneline ' + lastRelease + '..')
|
||||
.toString()
|
||||
);
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (
|
||||
childProcess
|
||||
.execSync('git rev-parse --abbrev-ref HEAD')
|
||||
@@ -92,12 +137,12 @@ module.exports = function(grunt) {
|
||||
|
||||
if (process.env.SKIP_TESTS !== '1') {
|
||||
grunt.log.writeln('Reinstalling dependencies...');
|
||||
childProcess.execSync('rm -rf node_modules && yarn', {
|
||||
childProcess.execSync('rm -rf node_modules && npm install', {
|
||||
stdio: [0, 1, 2]
|
||||
});
|
||||
|
||||
grunt.log.writeln('Running test suite...');
|
||||
childProcess.execSync('yarn test', { stdio: [0, 1, 2] });
|
||||
childProcess.execSync('grunt test', { stdio: [0, 1, 2] });
|
||||
}
|
||||
|
||||
var dir = tmp.dirSync().name;
|
||||
@@ -110,7 +155,7 @@ module.exports = function(grunt) {
|
||||
});
|
||||
|
||||
grunt.log.writeln('Installing production dependencies...');
|
||||
childProcess.execSync('yarn --production', {
|
||||
childProcess.execSync('npm install --production --silent', {
|
||||
cwd: dir,
|
||||
stdio: [0, 1, 2]
|
||||
});
|
||||
@@ -175,6 +220,13 @@ module.exports = function(grunt) {
|
||||
message: 'Did you review all the changes with "git diff"?',
|
||||
default: false
|
||||
},
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'changelog',
|
||||
message:
|
||||
'Are you sure the CHANGELOG.md contains all changes?',
|
||||
default: false
|
||||
},
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'tests',
|
||||
@@ -212,14 +264,11 @@ module.exports = function(grunt) {
|
||||
}
|
||||
|
||||
grunt.log.writeln(
|
||||
'\nPlease remember to tag this release, and add a release with changelog on Github!'
|
||||
'\nPlease remember to tag this relese, and add a release on Github!'
|
||||
);
|
||||
grunt.log.writeln(
|
||||
'\nAlso, please remember to test published Bower one more time!'
|
||||
);
|
||||
grunt.log.writeln(
|
||||
'\nYou can promote this bower release with "npm dist-tag add bower@' + jsonPackage.version + ' latest"'
|
||||
);
|
||||
grunt.log.writeln('\nPublishing Bower...');
|
||||
|
||||
childProcess.execSync('npm publish --tag beta', {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bower",
|
||||
"version": "1.8.3",
|
||||
"version": "1.8.0",
|
||||
"description": "The browser package manager",
|
||||
"author": "Twitter",
|
||||
"license": "MIT",
|
||||
@@ -96,7 +96,7 @@
|
||||
"coveralls": "coveralls",
|
||||
"prepublish": "in-publish && echo 'You need to use \"grunt publish\" to publish bower' && false || not-in-publish",
|
||||
"format": "prettier --write --single-quote --tab-width 4 '**/*.js'",
|
||||
"precommit": "lint-staged"
|
||||
"precommit": "lint-staged && npm test"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
|
||||
Reference in New Issue
Block a user