Compare commits

..

5 Commits

Author SHA1 Message Date
Ben
402c58d0b2 Update package.json
Bump to 1.8.4 as mentioned in https://github.com/bower/bower/issues/2483
2018-04-17 08:36:55 +02:00
Adam Stankiewicz
2aa1f27367 Update publish script 2018-03-28 20:16:27 +02:00
Adam Stankiewicz
275601601a Bump to 1.8.3 2018-03-28 19:52:42 +02:00
Adam Stankiewicz
c22c09546e Disable testing per commit and update changelog 2018-03-28 19:33:16 +02:00
Adam Stankiewicz
6bc778df32 Format with prettier (#2510) 2018-03-28 19:28:43 +02:00
3 changed files with 13 additions and 58 deletions

View File

@@ -1,5 +1,9 @@
# 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)

View File

@@ -75,53 +75,8 @@ 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')
@@ -137,12 +92,12 @@ module.exports = function(grunt) {
if (process.env.SKIP_TESTS !== '1') {
grunt.log.writeln('Reinstalling dependencies...');
childProcess.execSync('rm -rf node_modules && npm install', {
childProcess.execSync('rm -rf node_modules && yarn', {
stdio: [0, 1, 2]
});
grunt.log.writeln('Running test suite...');
childProcess.execSync('grunt test', { stdio: [0, 1, 2] });
childProcess.execSync('yarn test', { stdio: [0, 1, 2] });
}
var dir = tmp.dirSync().name;
@@ -155,7 +110,7 @@ module.exports = function(grunt) {
});
grunt.log.writeln('Installing production dependencies...');
childProcess.execSync('npm install --production --silent', {
childProcess.execSync('yarn --production', {
cwd: dir,
stdio: [0, 1, 2]
});
@@ -220,13 +175,6 @@ 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',
@@ -264,11 +212,14 @@ module.exports = function(grunt) {
}
grunt.log.writeln(
'\nPlease remember to tag this relese, and add a release on Github!'
'\nPlease remember to tag this release, and add a release with changelog 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', {

View File

@@ -1,6 +1,6 @@
{
"name": "bower",
"version": "1.8.0",
"version": "1.8.4",
"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 && npm test"
"precommit": "lint-staged"
},
"lint-staged": {
"*.js": [