a found a few other points where we talk about exiting and re-running
the script once fixed, but never actually exit. So i'm adding-in the
missing exits, and updating any existing exits to make sure we return a
failing return code to the shell
While i was testing this, i noticed that it ran right by the .env check,
even though i don't have a .env file at all. The script checks for a
_bad_ .env, but not a missing one.
Now it does
quoted from https://github.com/snipe/snipe-it/pull/14127
There is a race condition in the upgrade.php file where it can't
currently know the hard requirements for the version it's upgrading to
until it does a git pull. By that time, it will have pulled new source
code that possibly relies on an incompatible version of php, leaving you
with a broken installation.
Example: You're running v6.2.x on PHP 7.4, which is fine. v7 requires
PHP 8.1 or 8.2, but we couldn't know that when we released v6. or v5 for
that matter. We could change the requirements in the most-recent v6
version of upgrade.php, but that doesn't help anyone who doesn't upgrade
first to the most recent v6.
With this change, we implement fetching and incorporating the
requirements data from the remote file.
It's just fetching/decoding a couple of json values that replace the
hard-coded version requirements.
We move the branch checking higher than the php version checking so that
we can use the defined/overridden $branch to decide what branch to pull
the requirements from.
I've added the expiration date of the license associated with an asset in hardware/ID#software, it is useful to see all of them on the asset page instead of having to open the license details page. I've also fixed a space formatting issue.
using master until we make the switch to main. As master will keep
working after we switch branches, main will _not_ work _until_ we switch, and if
for some reason we have to delay the branch migration, this will remain
broken until we fix it.