From: Zach Panzarino Date: Tue, 10 May 2016 15:12:22 +0000 (+0000) Subject: Update CDN on bump X-Git-Tag: v2.1.3~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2511%2Fhead;p=thirdparty%2FChart.js.git Update CDN on bump --- diff --git a/gulpfile.js b/gulpfile.js index 5b35797f4..7700f6cdb 100644 --- a/gulpfile.js +++ b/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(); });