Skip to content

Commit

Permalink
Merge branch 'v2.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubboucek committed Mar 15, 2021
2 parents 260eec1 + 807bc0e commit e5435ec
Show file tree
Hide file tree
Showing 26 changed files with 17,163 additions and 607 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
dist/
.idea/
build/
dist/
nbproject/
node_modules/
vendor/
wordpress/
wordpress/
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "redbit/simpleshop-wp-plugin",
"description": "SimpleShop WordPress Plugin",
"keywords": ["simpleshop", "vyfakturuj", "api", "faktura"],
"homepage": "https://www.simpleshop.cz/category/wordpress-plugin/",
"homepage": "https://podpora.redbit.cz/stitek/wp-plugin/",
"type": "wordpress-plugin",
"license": "MIT",
"authors": [
Expand All @@ -16,6 +16,7 @@
},
"require": {
"php": ">=5.6.20",
"ext-json": "*",
"cmb2/cmb2": "dev-master",
"webdevstudios/cmb2-post-search-field": "dev-master",
"vyfakturuj/vyfakturuj-api-php": "^2.5"
Expand Down
5 changes: 3 additions & 2 deletions composer.lock

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

5 changes: 4 additions & 1 deletion deploy-exclude.lst
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
*.git*
*.gitignore*
*.idea*
*nbproject*
*assets*
*dist*
*node_modules*
*tools*
*wordpress*
*.DS_Store
composer.json
composer.lock
deploy-exclude.lst
deploy.php
package.json
package-lock.json
webpack.config.js
27 changes: 22 additions & 5 deletions deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
}



class DeployScript {
/** @var string */
public $distDir = '';
Expand Down Expand Up @@ -52,11 +51,15 @@ public function run( array $args ) {

$this->validateVersion( $this->version );

// Update deps
echo "Updating dependencies...\n";
// Update Composer deps
echo "Updating Composer dependencies...\n";
$this->updateComposer();
echo "Updating dependencides done OK.\n\n";
echo "Updating Composer dependencides done OK.\n\n";

// Update NPM deps
echo "Building Gutenberg blocks...\n";
$this->buildBlock();
echo "Building Gutenberg blocks done OK.\n\n";

// Building package
echo sprintf( 'Building package for version %s... ', $this->version );
Expand Down Expand Up @@ -178,7 +181,7 @@ private function cleanDir( $dir ) {

private function updateComposer( $baseDir = __DIR__ ) {
$prevDir = getcwd();
$cmd = 'composer install --ignore-platform-reqs';
$cmd = 'composer install --ignore-platform-reqs && composer status --verbose';

chdir( $baseDir );
passthru( $cmd, $return_var );
Expand All @@ -189,6 +192,20 @@ private function updateComposer( $baseDir = __DIR__ ) {
}
}

private function buildBlock( $baseDir = __DIR__ ) {
$prevDir = getcwd();
$cmd = 'npm install && npm run build';

chdir( $baseDir );
passthru( $cmd, $return_var );
chdir( $prevDir );

if ( $return_var !== 0 ) {
throw new \RuntimeException( sprintf( 'NPM command failed, command was: "%s"', $cmd ) );
}

}

/**
* @return string
*/
Expand Down
1 change: 0 additions & 1 deletion js/gutenberg/blocks.build.js

This file was deleted.

Loading

0 comments on commit e5435ec

Please sign in to comment.