Skip to content

Commit f7bd6f1

Browse files
update version constants with whitespace too
1 parent ec4df0b commit f7bd6f1

4 files changed

Lines changed: 12 additions & 9 deletions

File tree

bin/release_addon.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,25 @@ if [ -e "$PACKAGE_FILE" ]; then
3434
fi
3535

3636
# Build JS & CSS assets
37-
if [[ -e "gulpfile.js" ]]; then
38-
npx gulp
39-
else
40-
npm run build
37+
if [[ -e "package.json" ]]; then
38+
if [[ -e "gulpfile.js" ]]; then
39+
npx gulp
40+
else
41+
npm run build
42+
fi
4143
fi
4244

4345
# Update version numbers in code
4446
for FILE in "*.php"; do
4547
sed -i "s/^Version: .*$/Version: $VERSION/g" $FILE
46-
sed -i "s/define('\(.*_VERSION\)', '.*');/define('\1', '$VERSION');/g" $FILE
48+
sed -i "s/define(\s*'\(.*_VERSION\)', '.*'\s*);/define('\1', '$VERSION');/g" $FILE
4749
done
4850

4951
# Move up one directory level because we need plugin directory in ZIP file
5052
cd ..
5153

5254
zip -r "$PACKAGE_FILE" "$PLUGIN_DIR" \
5355
-x "$PLUGIN_DIR/.*" \
54-
-x "$PLUGIN_DIR/vendor/*" \
5556
-x "$PLUGIN_DIR/node_modules/*" \
5657
-x "$PLUGIN_DIR/bin/*" \
5758
-x "$PLUGIN_DIR/gulpfile.js" \

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
],
3838
"check-syntax": "find . -name '*.php' -not -path './vendor/*' -not -path './node_modules/*' -print0 | xargs -0 -n1 php -l",
3939
"check-codestyle": "vendor/bin/phpcs -sn",
40-
"check-plugin": "wp plugin check boxzilla --mode=update --ignore-warnings --ignore-codes=hidden_files,application_detected",
40+
"check-plugin": "wp plugin check boxzilla --mode=update --ignore-warnings --ignore-codes=hidden_files,application_detected,plugin_updater_detected",
4141
"static-analysis": "vendor/bin/phpstan analyse",
4242
"test": "vendor/bin/phpunit"
4343
},

src/licensing/class-api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function request($method, $endpoint, $data = [])
124124
'method' => $method,
125125
'headers' => [
126126
'Content-Type' => 'application/json',
127-
'Accepts' => 'application/json',
127+
'Accept' => 'application/json',
128128
],
129129
'timeout' => 10,
130130
];

src/licensing/class-update-manager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public function __construct(array $extensions, API $api, License $license)
4747
*/
4848
public function init()
4949
{
50-
// Disabled for WordPress.org compliance.
50+
add_filter('pre_set_site_transient_update_plugins', [ $this, 'add_updates' ]);
51+
add_filter('plugins_api', [ $this, 'get_plugin_info' ], 20, 3);
52+
add_filter('http_request_args', [ $this, 'add_auth_headers' ], 10, 2);
5153
}
5254

5355
/**

0 commit comments

Comments
 (0)