Commit graph

76 commits

Author SHA1 Message Date
Jeremy Price
782b35e0f1 Update scripts from snipe/snipe-it to grokability/snipe-it 2025-04-03 11:51:12 -07:00
snipe
fa72696a35 Removed redundent text
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:06:56 +00:00
snipe
9467ec2571 Nicer env text
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:05:45 +00:00
snipe
ac3f61c96a Fixed extra escape character
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:00:44 +00:00
snipe
759e3794df Small upgrader UI fixes
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 14:57:28 +00:00
snipe
a81c520d93 Follow up for #16341
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 20:15:09 +00:00
snipe
9b0ea51d35 Moved composer clear commands to after composer install per #16334
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 09:37:31 +00:00
snipe
4a0410d969 Uncomment git stash
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 16:55:39 +00:00
snipe
668b9f8fb9 Nicer upgrade.php UI
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 16:51:32 +00:00
snipe
3718f08c72 Changed composer order in upgrade script
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 12:05:00 +00:00
Brady Wetherington
0fa9f57971 Improvements to upgrade.php script to improve Windows experience 2024-08-21 11:53:38 +01:00
snipe
68136ea217
Merge pull request #15052 from snipe/jerm/handle-windows-ca-jank-in-upgrade-script
upgrade.php: If we're on windows, make sure we can load intermediate certificates
2024-07-11 09:11:37 +01:00
Jeremy Price
c8fe002688 upgrade.php: If we're on windows, make sure we can load intermediate certificates
According to https://github.com/curl/curl/issues/12155 and 2d6333101a

Some corporate Windows proxy (mis)configurations don't pass along
intermediate certificates in their TLS handshakes, breaking lots of
things that don't work around it.

This creates a problem in our curl calls when checking for
.upgrade_requirements.json, and seems to be the source of errors for a
few of our users: https://github.com/snipe/snipe-it/issues/14826#issuecomment-2197611342

In this change, we detect when running on windows environments and load
the curl option that works around this.
2024-07-08 22:13:14 -07:00
Jeremy Price
25fabcc1be More helpful output when we can't read .upgrade_requirements.json
Handle json decode errors and display the raw output in such cases, to
better understand what's happening and help debugging
2024-07-08 22:12:09 -07:00
Marcus Moore
0a5e58201a
Correctly account for "or" dependent extensions in upgrade script 2024-06-27 12:38:50 -07:00
snipe
b1e7c772ae Added exif to required extensions
Signed-off-by: snipe <snipe@snipe.net>
2024-05-22 18:27:52 +01:00
Korvin Szanto
5c1d4aff23 Capitalize N instead of y since no is default 2024-05-06 09:00:33 -07:00
q4kK
20920c262d Feat: add no-interactive flag for upgrade.php
Having a no-interactive flag is useful because attempting
to automate snipe-it upgrades is currently extremely janky.
You have to either:
  a) read the prompts and pass in the input (the "correct" way)
  b) pipe in input, e.g. `yes` and hope no new prompts
  are added.

With the `no-interactive` flag, this can be fixed by both
allowing new prompts to be added without conflict
to user prompts, but also allowing automated upgrades (you could
choose to crash, or assign defaults).
2024-04-16 11:54:50 -05:00
Jeremy Price
f4c1460c2b remove help text options until i put together the help text 2024-02-12 19:18:26 -08:00
Jeremy Price
bb2e1de0a8 Change how we check forward-looking upgrade requirements
In https://github.com/snipe/snipe-it/pull/14128 we added the capability
for the upgrade.php script to check version requirements _before_
downloading the new source, to help keep from breaking installations.

Turns out, `file_get_contents()` isn't a reliable way to grab a url, because
some systems have `allow_url_fopen` turned off in their PHP
configurations.

In this iteration, we swap that out for a curl function, while also
adding more error handling, the ability to entirely skip the
PHP version checks if for some reason you Just Can't query the upgrade
json correctly, as well as adding a lot of helpful text around the whole
issue.

Additionally, I've added some error checking around DB backups and
initial artisan down-ing, since shell_exec would happily march right
past any errors.
2024-02-12 19:18:26 -08:00
snipe
4e59b83885 Merge pull request #14128 from snipe/jerm/upgrade-dot-php
Add remote requirements checking to upgrade.php
2024-01-25 10:09:03 -08:00
snipe
a9d175a396 Check for max PHP version
Signed-off-by: snipe <snipe@snipe.net>
2023-07-05 18:47:48 +01:00
Brady Wetherington
3a2b54fd47 Add libsodium shim, and mark the sodium extension as 'optional'
Trying to handle some composer.lock conflicts, as savely as possible.
2023-02-15 18:16:39 -08:00
snipe
ec2afee57d Fixed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:12 -08:00
snipe
b10ea0c25c Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:38:56 -08:00
snipe
686d1aaae7 Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:38:29 -08:00
snipe
fe3b9f9e86 Added a self-update suggestion in the upgrader
Signed-off-by: snipe <snipe@snipe.net>
2022-05-25 19:18:37 -07:00
snipe
2b5b3273e2 Strip quote marks from env_values
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 20:52:03 -07:00
snipe
fa2a3e4b03 Added a line break
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 20:08:04 -07:00
snipe
94a337fc9e Rearrange a few thing
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 20:03:10 -07:00
snipe
8d9cdf9c15 Check for APP_ENV
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 19:56:42 -07:00
snipe
43e97ea6ea Make printout more consistent
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 19:36:01 -07:00
snipe
b67ed3eac2 Check for present APP_KEY as well
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 19:24:03 -07:00
snipe
116ce931ce Fixed path name to backup temp dir
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 18:44:32 -07:00
snipe
15d0fb4feb Added permissions check
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 18:40:15 -07:00
snipe
132b164a74 Slightly clarified error text
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 17:51:46 -07:00
snipe
bdbe2c3ac6 Added a simple .env checker into the upgrader
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 17:43:23 -07:00
snipe
d316a3f044 Added trailing comma per convention
Signed-off-by: snipe <snipe@snipe.net>
2022-05-17 19:13:07 -07:00
snipe
105750bfde Delete vendor/symfony/translation/TranslatorInterface.php in upgrader
Signed-off-by: snipe <snipe@snipe.net>
2022-05-17 19:11:03 -07:00
snipe
686e58806f Update upgrade.php with newer requires
Signed-off-by: snipe <snipe@snipe.net>
2021-11-22 15:31:23 -08:00
SBrown2021
c668cc3103
Typo in upgrade.php
Fixed typo on line 181. bootsrap/cache/services.php -> bootstrap/cache/services.php
2021-11-11 17:05:24 +00:00
snipe
bf7a856fa6 Update minimum PHP requirements to 7.2.5 2021-02-02 21:05:37 -08:00
snipe
65e6d56f1f Display the extension error at the bottom of the extension list to make it more noticable 2020-12-15 14:09:42 -08:00
snipe
615051cf66 Skip posix_getpwuid in upgrader if posix isn’t installed
We don’t need it for anything else, so no need to require it. Posix not being installed usually means it’s a windows machine.
2020-11-25 01:19:32 -08:00
snipe
72126f7d44 Removed duplicate extension checks 2020-11-12 13:24:53 -08:00
snipe
31d0b4a46c Merge remote-tracking branch 'origin/develop' 2020-11-10 12:39:55 -08:00
snipe
5759d4819e
Improved upgrade.php script to check for PHP extensions (#8712)
* Troubleshooting gd detection :(

* Welp, that didn’t work.

* Improvements to the update script that will make it easier to maintain

* Improved spacing

* Nicer intro

* Sorry for all the commits - I have to push in order to test :(

* More display improvements

* Phrasing!

* More formatting

* Removed extra line break

* Few more formatting changes

* Remove the config caching - it’s too confusing for users

* Added comments

* Temp required extension in the array so I can show output :)

* Added ascii x

* removed extra line break

* Made error message clearer

* Remove extra line

* Removed farts

* Changed phrasing for PHP upgrade warning

* Small tweaks per PR review

* Some spacing fixes

* Added confirmation of the either/ors

* Minor formatting tweaks

* Fixed weird indenting?

* Fixed missing $unused_file variable
2020-11-10 12:39:10 -08:00
snipe
c49788dd9f Fixed weird linebreaks in upgrade.php 2020-11-10 09:08:13 -08:00
snipe
3641a6d451 Additional extension checking 2020-11-10 09:06:44 -08:00
snipe
8c79070cd9 Added some extension checking for upgrade.php 2020-11-10 08:47:35 -08:00