CRM-16421 - distmaker - Set version in WP zip files #11397
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
When preparing zip files for WordPress, the
Version:
header should specify the actual version.Before
The file
civicrm.php
always hasVersion: 4.7
.After
While building the zip file,
civicrm.php
is filtered to specifyVersion: 4.7.29
(orVersion: 4.7.30
or similar).Technical Details
This uses the same technique as the Drupal build (wherein
*.info
files are tweaked to match the actual version).Due to the minor differences between GNU and BSD tool chains, the Drupal build script was sketchy. I rewrote that bit as a helper function (
dm_preg_edit
).To test this, I ran the
distmaker.sh
locally for both the WordPress and D7 builds -- then inspected the resulting files to ensure that versions were correctly updated.There isn't much to
r-run
on this patch -- just callingdistmaker.sh
. Alas, many folks aren't comfortable with that script. But there are automated builds on http://download.civicrm.org/latest . In lieu ofr-run
QA, perhaps we could merge and then have someone look at the new automated build? (We can quickly revert if the automated build fails.)