Skip to content

Commit a87185c

Browse files
committed
Add task for downloading updated certificate files.
1 parent be90e86 commit a87185c

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

Gruntfile.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,16 @@ module.exports = function(grunt) {
812812
dev: webpackConfig( { environment: 'development', buildTarget: WORKING_DIR } ),
813813
watch: webpackConfig( { environment: 'development', watch: true } )
814814
},
815+
downloadfile: {
816+
options: {
817+
dest: SOURCE_DIR + 'wp-includes/certificates',
818+
overwriteEverytime: true
819+
},
820+
files: {
821+
'cacert.pem': 'https://curl.se/ca/cacert.pem',
822+
'cacert.pem.sha256': 'https://curl.se/ca/cacert.pem.sha256'
823+
}
824+
},
815825
concat: {
816826
tinymce: {
817827
options: {
@@ -1249,6 +1259,8 @@ module.exports = function(grunt) {
12491259

12501260
// Register tasks.
12511261

1262+
grunt.loadNpmTasks( 'grunt-downloadfile' );
1263+
12521264
// Webpack task.
12531265
grunt.loadNpmTasks( 'grunt-webpack' );
12541266

@@ -1522,6 +1534,11 @@ module.exports = function(grunt) {
15221534
'concat:certificates'
15231535
] );
15241536

1537+
grunt.registerTask( 'update-certificates', [
1538+
'downloadfile',
1539+
'build:certificates'
1540+
] );
1541+
15251542
grunt.registerTask( 'build:files', [
15261543
'clean:files',
15271544
'copy:files',

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"grunt-contrib-qunit": "~10.1.1",
5252
"grunt-contrib-uglify": "~5.2.2",
5353
"grunt-contrib-watch": "~1.1.0",
54+
"grunt-downloadfile": "~2.1.1",
5455
"grunt-file-append": "0.0.7",
5556
"grunt-jsdoc": "2.4.1",
5657
"grunt-legacy-util": "^2.0.1",

0 commit comments

Comments
 (0)