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

Flush versionCheck cache when upgrading #12034

Merged
merged 1 commit into from
Apr 28, 2018
Merged

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Apr 27, 2018

Overview

After upgrading, clears the message about needing to upgrade.

* Removes cached version info.
*/
public function flushCache() {
unlink($this->cacheFile);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colemanw I think this needs a guard -- e.g. if (file_exists(...)) unlink(...)

@totten totten changed the base branch from master to 5.1 April 28, 2018 03:57
@totten
Copy link
Member

totten commented Apr 28, 2018

I've adapted this to target 5.1 (rebase, force-push, and edit the PR).

@totten totten removed the master label Apr 28, 2018
@totten
Copy link
Member

totten commented Apr 28, 2018

Looks good. I did an r-run as follows:

  • Setup a build with the patch
  • Observe: the cache file exists
  • Run ./tools/bin/scripts/set-version.php to bump the version up
  • Run drush civicrm-upgrade-db
  • Observe: the cache file does not exist anymore
  • Run cv api job.version_check
  • Observe: the cache file exists again

@totten totten merged commit 02b1b92 into civicrm:5.1 Apr 28, 2018
@colemanw colemanw deleted the versionCheck branch April 30, 2018 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants