Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pseudo-code script for testing out upgrades
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
You can’t perform that action at this time.