mirror of
https://github.com/videojs/video.js.git
synced 2025-07-15 01:34:23 +02:00
More build and testing cleanup. Also some reorganization.
This commit is contained in:
13
build/tasks/cdn-links.js
Normal file
13
build/tasks/cdn-links.js
Normal file
@ -0,0 +1,13 @@
|
||||
module.exports = function(grunt) {
|
||||
grunt.registerTask('cdn-links', 'Update the version of CDN links in docs', function(){
|
||||
var doc = grunt.file.read('docs/guides/setup.md');
|
||||
var version = require('../package.json').version;
|
||||
|
||||
// remove the patch version to point to the latest patch
|
||||
version = version.replace(/(\d+\.\d+)\.\d+/, '$1');
|
||||
|
||||
// update the version in http://vjs.zencdn.net/4.3/video.js
|
||||
doc = doc.replace(/(\/\/vjs\.zencdn\.net\/)\d+\.\d+(\.\d+)?/g, '$1'+version);
|
||||
grunt.file.write('docs/guides/setup.md', doc);
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user