Skip to content

Commit

Permalink
Merge pull request #1388 from vektor-inc/develop
Browse files Browse the repository at this point in the history
[ Change version ] 1.41.2.0
  • Loading branch information
kurudrive authored Aug 23, 2022
2 parents 44975de + 129d560 commit d7c6eee
Show file tree
Hide file tree
Showing 29 changed files with 915 additions and 276 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/develop-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:

jobs:
php_unit:
name: php unit test
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.3, 7.4]
# これが先にdevelopにマージされたら 8.0 を追加して 8.0 でおそらく baloon関連のテストでエラーになるので修正する
php-versions: ['7.3', '7.4']
# これが先にdevelopにマージされたら 5.8.4 不具合修正のブランチ( https://github.com/vektor-inc/vk-blocks-pro/pull/1372 )にマージして '5.8.4' を追加
wp-versions: ['6.0.1','5.9.3','5.8.4']
name: PHP Unit test ${{ matrix.php-versions }} / WP ${{ matrix.wp-versions }} Test on ${{ matrix.operating-system }}
services:
mysql:
image: mysql:5.7
Expand Down Expand Up @@ -43,11 +46,11 @@ jobs:
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Setup PHP ${{ matrix.php }}
key: ${{ runner.os }}-php${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
- name: Setup PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: ${{ matrix.php-versions }}
- name: install npm scripts
run: npm install
- name: install Composer Package
Expand All @@ -57,14 +60,15 @@ jobs:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv wp-cli.phar /usr/local/bin/wp
- name: Install several WordPress version by wp-env.override.json
run: WP_ENV_PHP_VERSION=${{ matrix.php-versions }} WP_ENV_CORE=WordPress/WordPress#${{ matrix.wp-versions }} npm run wp-env start --update
- name: Check WordPress Version
run: npm run wp-env run cli wp core version
# dist の中で build は実行している
- name: Build and Dist
run: npm run dist

# PHPUnit
- name: Run @wordpress/env
run: npx wp-env start
- name: PHP Unit Test
run: npm run phpunit

Expand Down
8 changes: 6 additions & 2 deletions bin/deploy-free.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ version=$1
mv vk-blocks/ vk-blocks-copy-target/
# Cloneした無料版のディレクトリに移動
cd ./vk-blocks-copy-target/
# コピー先の src/ を一旦削除
rm -rf src/*
# コピー先の トップディレクトリ を一旦削除
rm -rf editor-css/* inc/* lib/* options-css/* src/*

# プロ版のディレクトリに移動
cd ../
# 指定したファイルを除外して、Pro版を無料版(vk-blocks-copy-target)へコピー&上書き
# -a : archive -rlptgoDとイコール
# -r : 指定ディレクトリ配下をすべて対象
# -v : コピーファイルの転送情報を出力
# -c : チェックサムで差分を確認
rsync -arvc --exclude 'vk-blocks-copy-target/' --exclude 'vendor/' --exclude 'bin/' --exclude 'build/_pro/' --exclude 'src/blocks/_pro/' --exclude 'inc/vk-blocks-pro/' --exclude '.git/' --exclude '.github/' --exclude 'build/block-build.css' --exclude 'inc/vk-blocks-pro-config.php' --exclude 'src/blocks/bundle-pro.js' --exclude '.gitignore' --exclude 'build/*.css' --exclude 'build/*.js' --exclude 'editor-css/*.css' --exclude 'editor-css/*.css.map' --exclude 'vk-blocks-pro.code-workspace' --exclude 'phpunit.xml.dist' ./* ./vk-blocks-copy-target/

# 無料版のディレクトリに移動
Expand Down
16 changes: 4 additions & 12 deletions inc/vk-blocks/class-vk-blocks-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static function balloon_image_number() {
*
* @return $balloon_meta_schema
*/
public function balloon_meta_schema() {
public static function balloon_meta_schema() {
$number = self::balloon_image_number();
$return_array = array();
$return_array['default_icons'] = array(
Expand Down Expand Up @@ -188,17 +188,9 @@ public static function get_properties( $schema ) {
* @return options
*/
public static function get_balloon_meta_options() {
$options = get_option( 'vk_blocks_balloon_meta' );
$number = self::balloon_image_number();
$defaults = array();
$defaults['default_icons'] = array();
for ( $i = 1; $i <= $number; $i++ ) {
$defaults['default_icons'][ $i ] = array(
'name' => null,
'src' => null,
);
};
$options = wp_parse_args( $options, $defaults );
$options = get_option( 'vk_blocks_balloon_meta' );
$defaults = self::get_properties( self::balloon_meta_schema() );
$options = wp_parse_args( $options, $defaults );
return $options;
}

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file modified inc/vk-blocks/languages/vk-blocks-ja.mo
Binary file not shown.
Loading

0 comments on commit d7c6eee

Please sign in to comment.