Created
April 19, 2019 02:30
-
-
Save joncrain/a1ae1e35bd4d2d1c0ada2dca23e27b24 to your computer and use it in GitHub Desktop.
Pseudo-code script for testing out upgrades
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone -b v2.7.3 https://github.com/munkireport/munkireport-php.git ./test | |
cd ./test | |
cp config_default.php ./config.php | |
echo "\$conf['auth']['auth_noauth'] = array();" >> ./config.php | |
php -S localhost:8080 -t ./ # this will run site locally | |
### in another terminal run the following | |
sudo /bin/bash -c "$(curl -s http://localhost:8080/index.php?/install)" | |
sudo /usr/local/munki/preflight && /usr/local/munki/postflight | |
git pull origin master | |
# stop web server (it's served out of public now) | |
composer install | |
# change to .env file | |
./build/config_to_env | |
# clean up .env of unused defaults, otherwise the newer install script fails | |
php -S localhost:8080 -t ./public | |
php database/migrate.php # like 10 times. General error: 17 is ok, fix the others | |
# 2.7.3 (migration issues) drop table bluetooth_orig | |
# 2.7.3 (migration issues) drop table munkireport_orig | |
# 2.13 (migration issues) clear power table indexes | |
# 2.13 (migration issues) drop table smart_stats_orig | |
sudo /bin/bash -c "$(curl -s http://localhost:8080/index.php?/install)" | |
sudo /usr/local/munki/preflight && /usr/local/munki/postflight |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment