Skip to content

Commit

Permalink
Remove old grunt deploy related code. See WordPress#543
Browse files Browse the repository at this point in the history
  • Loading branch information
dd32 committed Aug 22, 2024
1 parent e0b7ffd commit c2be5cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 182 deletions.
33 changes: 0 additions & 33 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ module.exports = function( grunt ) {
invert: true,
} );

/**
* Check if CLI input appears to indicate a truthy value.
*
* @param {string} input Value to check.
* @return {boolean} If value appears to be truthy.
*/
function isTruthy( input ) {
return ( '1' === input || 'true' === input );
}

grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),

Expand All @@ -47,23 +37,6 @@ module.exports = function( grunt ) {
],
},
},

wp_deploy: {
options: {
plugin_slug: 'two-factor',
build_dir: '<%= dist_dir %>',
assets_dir: 'assets',
},
wporg: {
options: {
skip_confirmation: isTruthy( process.env.DEPLOY_SKIP_CONFIRMATION ),
svn_user: process.env.DEPLOY_SVN_USERNAME,
deploy_tag: isTruthy( process.env.DEPLOY_TAG ),
deploy_trunk: isTruthy( process.env.DEPLOY_TRUNK ),
assets_dir: ( isTruthy( process.env.DEPLOY_TAG ) || isTruthy( process.env.DEPLOY_TRUNK ) ) ? 'assets' : null,
},
},
},
} );

grunt.registerTask(
Expand All @@ -73,10 +46,4 @@ module.exports = function( grunt ) {
]
);

Check failure on line 47 in Gruntfile.js

View workflow job for this annotation

GitHub Actions / Lint and Test

Block must not be padded by blank lines

grunt.registerTask(
'deploy', [
'build',
'wp_deploy',
]
);
};
153 changes: 6 additions & 147 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"homepage": "https://github.com/wordpress/two-factor",
"scripts": {
"env": "wp-env",
"deploy": "grunt deploy",
"build": "grunt build",
"lint": "npm-run-all lint:*",
"lint:php": "composer lint",
Expand Down Expand Up @@ -41,7 +40,6 @@
"grunt-cli": "^1.4.3",
"grunt-contrib-clean": "^2.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-wp-deploy": "^2.1.2",
"load-grunt-tasks": "^5.1.0",
"npm-run-all": "^4.1.5",
"parse-gitignore": "^0.5.1"
Expand Down

0 comments on commit c2be5cc

Please sign in to comment.