mirror of https://github.com/docker/docs.git
Fixed bug where boot2docker iso would not be downloaded only once in dev mode
This commit is contained in:
parent
2060523172
commit
9fcb3163fa
|
|
@ -29,11 +29,10 @@ module.exports = function (grunt) {
|
||||||
};
|
};
|
||||||
|
|
||||||
grunt.registerTask('download-boot2docker-iso', 'Downloads provided boot2docker version', function () {
|
grunt.registerTask('download-boot2docker-iso', 'Downloads provided boot2docker version', function () {
|
||||||
var version = grunt.config('version');
|
|
||||||
try {
|
try {
|
||||||
var data = fs.readFileSync(path.join('resources', 'boot2docker.iso'));
|
var data = fs.readFileSync(path.join('resources', 'boot2docker.iso'), {encoding: 'utf-8'});
|
||||||
var match = data.match(/Boot2Docker-v(\d+\.\d+\.\d+)/);
|
var match = data.match(/Boot2Docker-v(\d+\.\d+\.\d+)/);
|
||||||
if (match && match[1] !== version) {
|
if (match && match[1] !== packagejson['docker-version']) {
|
||||||
grunt.task.run('curl:boot2docker-iso');
|
grunt.task.run('curl:boot2docker-iso');
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
@ -52,6 +51,7 @@ module.exports = function (grunt) {
|
||||||
grunt.task.run('chmod');
|
grunt.task.run('chmod');
|
||||||
}
|
}
|
||||||
done();
|
done();
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -131,7 +131,7 @@ module.exports = function (grunt) {
|
||||||
authors: 'Docker Inc.',
|
authors: 'Docker Inc.',
|
||||||
loadingGif: 'util/loading.gif',
|
loadingGif: 'util/loading.gif',
|
||||||
setupIcon: 'util/setup.ico',
|
setupIcon: 'util/setup.ico',
|
||||||
iconUrl: 'util/kitematic.ico',
|
iconUrl: 'https://raw.githubusercontent.com/kitematic/kitematic/master/util/kitematic.ico',
|
||||||
description: APPNAME,
|
description: APPNAME,
|
||||||
title: APPNAME,
|
title: APPNAME,
|
||||||
exe: BASENAME + '.exe',
|
exe: BASENAME + '.exe',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue