From 95be0f964f4e280c45e3f23836cdbb9c052fe359 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Sun, 1 Nov 2020 19:29:16 -0800 Subject: [PATCH 1/2] Add GitHub Updater stuff Add headers for GitHub Updater Add filter to overide dot org updates Add filter to increase number of rollbacks (adjustable) --- gutenberg.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gutenberg.php b/gutenberg.php index e9aee7770e221..db0d1f821f83d 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -8,10 +8,29 @@ * Version: 9.2.2.20201101 * Author: Gutenberg Team / Birgit Pauli-Haack (Gutenberg Times) * Text Domain: gutenberg + * GitHub Plugin URI: bph/gutenberg + * Release Asset: true * * @package gutenberg */ +add_filter( + 'github_updater_override_dot_org', + function ( $overrides ) { + return array_merge( + $overrides, + array( 'gutenberg/gutenberg.php' ) + ); + } +); + +add_filter( + 'github_updater_number_rollbacks', + function () { + return 2; + } +); + ### BEGIN AUTO-GENERATED DEFINES defined( 'GUTENBERG_DEVELOPMENT_MODE' ) or define( 'GUTENBERG_DEVELOPMENT_MODE', true ); ### END AUTO-GENERATED DEFINES From 3cb9bbd23c8709cabb944ad5e29fb99ad37972d0 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Sun, 1 Nov 2020 20:04:11 -0800 Subject: [PATCH 2/2] added filter to remove branches from branch switcher leaving only tags --- gutenberg.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gutenberg.php b/gutenberg.php index db0d1f821f83d..dd62730f5e0f6 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -14,6 +14,7 @@ * @package gutenberg */ +// GitHub Updater filters. add_filter( 'github_updater_override_dot_org', function ( $overrides ) { @@ -23,13 +24,15 @@ function ( $overrides ) { ); } ); - add_filter( 'github_updater_number_rollbacks', function () { return 2; } ); +add_filter( 'github_updater_no_release_asset_branches', '__return_true' ); +// End GitHub Updater filters. + ### BEGIN AUTO-GENERATED DEFINES defined( 'GUTENBERG_DEVELOPMENT_MODE' ) or define( 'GUTENBERG_DEVELOPMENT_MODE', true );