Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65208

Add cli upgrade option to test if an upgrade is required

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Have moodle in a clean state and run the upgrade with the new option:

        $ php admin/cli/upgrade.php --is-pending; echo $?
        No upgrade needed for the installed version 3.7dev (Build: 20190322) (2019032200). Thanks for coming anyway!
        0

      2. Check you get the preceding message and 0
      3. Hack a version file somewhere (version.php) and run it again:

        $ php admin/cli/upgrade.php --is-pending; echo $?
        An upgrade is pending
        2
        

      4. Check that is says it is pending, and also the exit code is 2 this time.

       

      Show
      Have moodle in a clean state and run the upgrade with the new option: $ php admin/cli/upgrade.php --is-pending; echo $? No upgrade needed for the installed version 3 .7dev (Build: 20190322 ) ( 2019032200 ). Thanks for coming anyway! 0 Check you get the preceding message and 0 Hack a version file somewhere (version.php) and run it again: $ php admin/cli/upgrade.php --is-pending; echo $? An upgrade is pending 2 Check that is says it is pending, and also the exit code is 2 this time.  
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-65208-cli-upgrade-is-pending

      Description

      There is currently no way of determining whether an upgrade is pending from the cli without side effects. eg attempting to cron.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 5 minutes
                1h 5m