mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Merge pull request #2511 from zachpanz88/build-update
Update CDN on bump
This commit is contained in:
commit
64b9510ded
10
gulpfile.js
10
gulpfile.js
@ -116,7 +116,8 @@ function bumpTask(complete) {
|
||||
choices: choices
|
||||
}, function(res) {
|
||||
var increment = res.version.split(' ')[0],
|
||||
newVersion = semver.inc(package.version, increment);
|
||||
newVersion = semver.inc(package.version, increment),
|
||||
oldVersion = package.version;
|
||||
|
||||
// Set the new versions into the bower/package object
|
||||
package.version = newVersion;
|
||||
@ -125,6 +126,13 @@ function bumpTask(complete) {
|
||||
// Write these to their own files, then build the output
|
||||
fs.writeFileSync('package.json', JSON.stringify(package, null, 2));
|
||||
fs.writeFileSync('bower.json', JSON.stringify(bower, null, 2));
|
||||
|
||||
var oldCDN = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/'+oldVersion+'/Chart.min.js',
|
||||
newCDN = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/'+newVersion+'/Chart.min.js';
|
||||
|
||||
gulp.src(['./README.md'])
|
||||
.pipe(replace(oldCDN, newCDN))
|
||||
.pipe(gulp.dest('./'));
|
||||
|
||||
complete();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user