Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Apr 21, 2023
2 parents 6e0d19e + 009aa21 commit f49cb43
Show file tree
Hide file tree
Showing 32 changed files with 289 additions and 155 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.txt]
end_of_line = crlf
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.gitattributes export-ignore
.gitignore export-ignore
.editorconfig export-ignore
composer.lock export-ignore
phpunit.xml export-ignore
phpcs.xml export-ignore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get tag
id: tag
Expand Down
79 changes: 38 additions & 41 deletions .github/workflows/wp-phpunit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Based on https://github.com/wp-cli/scaffold-command/blob/f9bad3dd7224d5684d950d31c486df70905e386f/templates/plugin-github.mustache
# Thanks Josh https://github.com/Shelob9/wordpress-plugin/blob/main/.github/workflows/wordpress.yml
# Thanks https://github.com/shivammathur
# Thanks Alex Stine for rubber ducking and help figuring out MySQL 5.7
# Thanks @desrosj for idea to just use MySQL 8.0 with correct authentication method.
name: WordPress Tests

on:
Expand All @@ -15,48 +17,43 @@ on:

jobs:
run:
runs-on: ${{ matrix.operating-system }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1']
phpunit-versions: ['9.5.20']
include:
- php-versions: '7.2'
phpunit-versions: '7.5.20'
operating-system: ubuntu-18.04
- php-versions: '7.3'
phpunit-versions: '9.5.20'
operating-system: 'ubuntu-18.04'
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
php-versions: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]

name: PHP ${{ matrix.php-versions }} Test on ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
extensions: mysql
tools: wp-cli, phpunit-polyfills, phpunit:${{ matrix.phpunit-versions }}
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check PHP Version
run: php -v

- name: Composer install
run: composer install --optimize-autoloader --prefer-dist

- name: Start Mysql
run: sudo service mysql start

- name: Install WP Tests
run: bash bin/install-wp-tests.sh wordpress_test root root localhost latest

- name: phpunit tests
run: |
echo "define('WP_TESTS_PHPUNIT_POLYFILLS_PATH', '$HOME/.composer/vendor/yoast/phpunit-polyfills');" >> /tmp/wordpress-tests-lib/wp-tests-config.php
/usr/local/bin/phpunit --config=phpunit.xml
- name: Checkout
uses: actions/checkout@v3

- name: Setup MySQL 8.0 with mysql_native_password
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: "8.0"
my-cnf: |
bind_address=127.0.0.1
default-authentication-plugin=mysql_native_password
root-password: root

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
extensions: mysql, mysqli
tools: composer, wp-cli, phpunit-polyfills, phpunit
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Composer install
run: composer install --optimize-autoloader --prefer-dist

- name: Install WP Tests
run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 latest

- name: PHPUnit tests
run: |
echo "define('WP_TESTS_PHPUNIT_POLYFILLS_PATH', '$HOME/.composer/vendor/yoast/phpunit-polyfills');" >> /tmp/wordpress-tests-lib/wp-tests-config.php
phpunit --config=phpunit.xml
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#### [unreleased]

#### 12.2.0 / 2023-04-20
* update `freemius/wordpress-sdk`
* update `afragen/wp-dismiss-notice`
* don't save unused data from `API_Common::parse_release_asset()`
* don't use Freemius uninstall, use previous `uninstall.php`
* more PHP 8.2 compatibility
* composer update
* update `REST_API::get_plugins_api_data()` to return response without download link using boolean value in `download` query arg
* hide Freemius menus with `gu_hide_settings` filter
* more specific hiding of Git Updater settings

#### 12.1.3 / 2023-03-20
* improved setting/default of `$options['bypass_background_processing']`
* improved setting/default of `$options['branch_switch']`
Expand Down
22 changes: 11 additions & 11 deletions composer.lock

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

2 changes: 1 addition & 1 deletion git-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin Name: Git Updater
* Plugin URI: https://git-updater.com
* Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist.
* Version: 12.1.3
* Version: 12.2.0
* Author: Andy Fragen
* License: MIT
* Domain Path: /languages
Expand Down
46 changes: 23 additions & 23 deletions languages/git-updater.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
# This file is distributed under the MIT.
msgid ""
msgstr ""
"Project-Id-Version: Git Updater 12.1.3\n"
"Project-Id-Version: Git Updater 12.2.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/git-updater\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2023-03-20T16:09:35+00:00\n"
"POT-Creation-Date: 2023-04-19T18:44:46+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.7.1\n"
"X-Domain: git-updater\n"

#. Plugin Name of the plugin
#: src/Git_Updater/Settings.php:173
#: src/Git_Updater/Settings.php:306
#: src/Git_Updater/Settings.php:176
#: src/Git_Updater/Settings.php:309
msgid "Git Updater"
msgstr ""

Expand Down Expand Up @@ -168,74 +168,74 @@ msgstr ""
msgid "Purchase from Store"
msgstr ""

#: src/Git_Updater/Settings.php:145
#: src/Git_Updater/Settings.php:845
#: src/Git_Updater/Settings.php:148
#: src/Git_Updater/Settings.php:848
msgid "Settings"
msgstr ""

#: src/Git_Updater/Settings.php:248
#: src/Git_Updater/Settings.php:408
#: src/Git_Updater/Settings.php:251
#: src/Git_Updater/Settings.php:411
msgid "Git Updater Settings"
msgstr ""

#: src/Git_Updater/Settings.php:249
#: src/Git_Updater/Settings.php:252
msgctxt "Menu item"
msgid "Git Updater"
msgstr ""

#: src/Git_Updater/Settings.php:330
#: src/Git_Updater/Settings.php:333
msgid "Refresh Cache"
msgstr ""

#: src/Git_Updater/Settings.php:375
#: src/Git_Updater/Settings.php:378
msgid "Settings saved."
msgstr ""

#: src/Git_Updater/Settings.php:377
#: src/Git_Updater/Settings.php:380
msgid "Cache refreshed."
msgstr ""

#: src/Git_Updater/Settings.php:421
#: src/Git_Updater/Settings.php:424
msgid "Enable Branch Switching"
msgstr ""

#: src/Git_Updater/Settings.php:433
#: src/Git_Updater/Settings.php:436
msgid "Bypass WP-Cron Background Processing for Debugging"
msgstr ""

#: src/Git_Updater/Settings.php:445
#: src/Git_Updater/Settings.php:448
msgid "Display `deprecated hook` messaging in debug.log"
msgstr ""

#: src/Git_Updater/Settings.php:608
#: src/Git_Updater/Settings.php:611
msgid "Check to enable."
msgstr ""

#: src/Git_Updater/Settings.php:647
#: src/Git_Updater/Settings.php:650
msgid "Overridden Plugins and Themes"
msgstr ""

#: src/Git_Updater/Settings.php:648
#: src/Git_Updater/Settings.php:651
msgid "The following plugins or themes might exist on wp.org, but any updates will be downloaded from their respective git repositories."
msgstr ""

#: src/Git_Updater/Settings.php:879
#: src/Git_Updater/Settings.php:882
msgid "This is a private repository."
msgstr ""

#: src/Git_Updater/Settings.php:880
#: src/Git_Updater/Settings.php:883
msgid "This repository has not connected to the API or was unable to connect."
msgstr ""

#: src/Git_Updater/Settings.php:881
#: src/Git_Updater/Settings.php:884
msgid "This repository is hosted on WordPress.org."
msgstr ""

#: src/Git_Updater/Settings.php:882
#: src/Git_Updater/Settings.php:885
msgid "This repository has been ignored and does not connect to the API."
msgstr ""

#: src/Git_Updater/Settings.php:926
#: src/Git_Updater/Settings.php:929
msgid "Installed Plugins and Themes"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<testsuites>
<testsuite name="tests">
<directory prefix="test-" suffix=".php">./tests/</directory>
<exclude>./tests/test-sample.php</exclude>
</testsuite>
</testsuites>
</phpunit>
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ We now have a [Slack team for Git Updater](https://git-updater.slack.com). Pleas
#### Translations

If you are a polyglot I would greatly appreciate translation contributions to [GlotPress for Git Updater](https://translate.git-updater.com).

## Installation

Go to [git-updater.com](https://git-updater.com) to download and install the latest version.
2 changes: 1 addition & 1 deletion src/Git_Updater/API/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public function set_readme_info( $readme ) {
} else {
$readme['sections']['other_notes'] .= $readme['remaining_content'];
}
unset( $readme['sections']['screenshots'], $readme['sections']['installation'] );
unset( $readme['sections']['screenshots'] );
$readme['sections'] = ! empty( $readme['sections'] ) ? $readme['sections'] : [];
$this->type->sections = array_merge( (array) $this->type->sections, (array) $readme['sections'] );

Expand Down
2 changes: 1 addition & 1 deletion src/Git_Updater/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function load() {
*/
$hide_settings = $hide_settings ?: (bool) apply_filters_deprecated( 'github_updater_hide_settings', [ false ], '10.0.0', 'gu_hide_settings' );

if ( ! $hide_settings && Singleton::get_instance( 'Init', $this )->can_update() ) {
if ( Singleton::get_instance( 'Init', $this )->can_update() ) {
Singleton::get_instance( 'Settings', $this )->run();
Singleton::get_instance( 'Add_Ons', $this )->load_hooks();
}
Expand Down
14 changes: 14 additions & 0 deletions src/Git_Updater/Branch.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ class Branch {
*/
protected $base;

/**
* Holds rollback tag.
*
* @var string|bool
*/
protected $tag;

/**
* Holds current repo cache.
*
* @var array|bool
*/
protected $cache;

/**
* Constructor.
*/
Expand Down
Loading

0 comments on commit f49cb43

Please sign in to comment.