Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(dev/wordpress#85) Fix version number reported within WordPress admin UI #19384

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

totten
Copy link
Member

@totten totten commented Jan 14, 2021

Overview

Updates distmaker so that WordPress zipballs include more accurate metadata about the Civi version.

More info: https://lab.civicrm.org/dev/wordpress/-/issues/85

Before

Only works if civicrm-wordpress:civicrm.php has the Version: header at the start of a line

After

Works with Version: header in an indented docblock.

Comments

Regressed in 5.33 due to code-cleanup in civicrm/civicrm-wordpress@ec410b08

@civibot
Copy link

civibot bot commented Jan 14, 2021

(Standard links)

@civibot civibot bot added the 5.34 label Jan 14, 2021
@totten
Copy link
Member Author

totten commented Jan 14, 2021

cc @kcristiano @seamuslee001

@seamuslee001
Copy link
Contributor

@totten I tested this with a local dist build

I can see it correctly set the version in the doc block but it seems the define is still stuck on 4.7

<?php
/**
 * Plugin Name: CiviCRM
 * Description: CiviCRM - Growing and Sustaining Relationships
 * Version: 5.34.beta1
 * Requires at least: 4.9
 * Requires PHP:      7.1
 * Author: CiviCRM LLC
 * Author URI: https://civicrm.org/
 * Plugin URI: https://docs.civicrm.org/sysadmin/en/latest/install/wordpress/
 * License: AGPL3
 * Text Domain: civicrm
 * Domain Path: /languages
 */

/*
 +--------------------------------------------------------------------+
 | Copyright CiviCRM LLC. All rights reserved.                        |
 |                                                                    |
 | This work is published under the GNU AGPLv3 license with some      |
 | permitted exceptions and without any warranty. For full license    |
 | and copyright information, see https://civicrm.org/licensing       |
 +--------------------------------------------------------------------+
 */

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC https://civicrm.org/licensing
 *
 */

/*
 * -----------------------------------------------------------------------------
 * WordPress resources for developers
 * -----------------------------------------------------------------------------
 * Not that they're ever adhered to anywhere other than core, but people do their
 * best to comply...
 *
 * WordPress core coding standards:
 * https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/
 *
 * WordPress HTML standards:
 * https://make.wordpress.org/core/handbook/best-practices/coding-standards/html/
 *
 * WordPress JavaScript standards:
 * https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/
 * -----------------------------------------------------------------------------
 */

// This file must not accessed directly.
if (!defined('ABSPATH')) {
  exit;
}

// Set version here: when it changes, will force Javascript & CSS to reload.
define('CIVICRM_PLUGIN_VERSION', '4.7');

@seamuslee001
Copy link
Contributor

@totten I found removing the space between the define( and the \' in the regex seemed to solve things here for me

@seamuslee001
Copy link
Contributor

matches what I did locally Merge on pass

@totten totten merged commit 054ca0a into civicrm:5.34 Jan 15, 2021
@totten totten deleted the 5.34-distmaker-wpver branch January 15, 2021 07:21
@kcristiano
Copy link
Member

Since 5.33 is LTS I think we should backport this before the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants