Skip to content

Commit

Permalink
7.0.0-beta3 Release (#541)
Browse files Browse the repository at this point in the history
* 391 Notification refactorings (#441)

* Refactor notifications to allow easier plugins

* Notification refactoring

* Formatting

* Move news to NewsService; cleanup of events

* More refactoring; added send email out for news item and the template

* Formatting

* Formatting

* Fix missing newsRepo (#445)

* Refactor and add importer to Installer module #443 (#444)

* Refactor and add importer to Installer module #443

* Refactor for finances to use in import

* Import groups into roles

* Formatting

* Formatting

* Add interface in installer for import

* Notes about importing

* Check for installer folder

* Formatting

* Fix pirep->user mapping

* Unused import

* Formatting

* Replace importer with AJAX powered; better error handling #443 (#447)

* Replace importer with AJAX powered; better error handling #443

* Formatting

* Fix command line importer

* Remove bootstrap cache (#448)

* Cleanup the bootstrap/cache directory when packaging

* Fix removal of bootstrap cache

* Formatting

* Stricter checks on ACARS API data (#451)

* Stricter checks on ACARS API data

* More checks

* Fix for flight_number check forcing to exist

* Allow nullable on flight_id

* Avoid proc_open use #455 (#456)

* Use PhpExecutableFinder() closes #457 #458 (#460)

* Use DateTimeZone instead of int for creating datetime

closes #461

* Fix CSV imports giving Storage class not found #454 (#462)

* Fix CSV imports giving Storage class not found #454

* Update yarn files for security alert

* Add PHP 7.4 support (#464)

* Add PHP 7.4 to build matrix

* DB fix

* YAML parser fix in test data

* Show versions

* Package updates

* Track used ICAOs

* 7.4 METAR parsing fix

* METAR parser fix

* Formatting

* Add meters to response units

* Call instance for unit conversion

* Return value

* Catch exception for unknown quantity

* Comment fix

* Formatting

* METAR parsing fixes on PHP 7.4

* Package updates

* More random airport ID

* More random airport ID

* Properly disable toolbar

* Semver written out to version file

* Use dev as default identifier

* Fix BindingResolutionError when debug toolbar isn't present (#465)

* Fix BindingResolutionError when debug toolbar isn't present

* Formatting

* Split the importer module out from the installer module (#468)

* Split the importer module out from the installer module

* Cleanup of unused imports

* Move updater into separate module #453

* Remove unused imports/formatting

* Disable the install and importer modules at the end of the setup

* Unused imports; update IJ style

* test explicit stage for php+mysql

* add more to matrix

* Add different MariaDB versions

* undo

* Cleanup Model doc

* Pilots cannot use the dashboard or flights without admin rights (#481)

* Use auth middleware instead of specific groups for logged in state

* Auth check for admin access

* Check user admin access for updates

* Formatting

* Allow nullable field and calculate distance if nulled for flight import #478 (#482)

* Check for no roles being attached #480 (#483)

* Return the flight fares if there are no subfleet fares #488 (#489)

* Return the flight fares if there are no subfleet fares #488

* Formatting

* Formatting

* Account for units when entering fuel amounts #493

* Search for ICAO not working properly (#496)

* /flights and /flights/search direct to the same endpoint

* Properly set the distance/planned_distance on save (#497)

* 491 Installation Error (#495)

* Disable CSRF token

* Add error handling around looking up the theme and set a default

* Note about logs in issue template

* Formatting

* Fix GeoService errors when viewing PIREP #498 (#499)

* Add new command to export a specific PIREP for debugging (#501)

* Set a default model value for airports on PIREP (#500)

* Set a default model value for airports on PIREP

* Fix airport icao reference

* Default airport models

* Catch broader exception writing out config files #491

* style

* Add reference to docs on doc site (#502)

* Properly create/update rows importing #486 (#503)

* Add base Dockerfile for Dockerhub builds (#504)

* New subfleet not being attached to an airline on import #479 (#505)

* Fix subfleet not being attached to an airline on creation in import #479

* Call airline name with optional() around subfleet

* Minor cleanup

* Search flights by subfleet #484 (#506)

* API level search of flights #484

* Add Subfleet to flights page for search

* Make the fuel used optional (#512)

* Add make to Docker container

* Add getRootDomain() to Utils (#514)

* Show admin dropdown for admin-access ability (#515)

* Show admin dropdown for admin-access ability closes #509

* Formatting

* Check user permissions on the routes #508 (#516)

* Check user permissions on the routes #508

* Formatting

* Return default value on exception for setting()

* Correct text for no subfleets #507 (#518)

* Add a public_url() helper #513 (#519)

* Reduce number of queries for update check (#520)

* Try to clear caches before updating (#522)

* Try to clear caches before updating

* Add clear-compiled to maintenance cache list

* Formatting

* Set PIREPs page to public (#526)

Set PIREPs page to public

* Fix live and route map errors #527 (#528)

* Add menu bar for mobile (#529)

* Format all blade templates to 2 spaces #530 (#531)

* Fix PIREP edit endpoint closes #533 (#534)

* Fix import during flight cron #532 (#535)

* PIREPS resource except for show (#536)

* Use optional() around the airport fields (#537)

* Use optional() around the airport fields

* Add null-coalesce around full_name

* Add link to download ACARS config from profile (#539)

* Add link to download ACARS config from profile

* Formatting

* Update xml config file template (#540)
  • Loading branch information
nabeelio committed Feb 8, 2020
1 parent a335ed8 commit 073e48c
Show file tree
Hide file tree
Showing 515 changed files with 13,951 additions and 10,729 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.
A clear and concise description of what the bug is. Please upload the Laravel logs as well from `storage/logs/laravel.log` (or the file with the correct date)

**Version**
Please enter the version
Expand Down
89 changes: 84 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ language: php
php:
- '7.2'
- '7.3'
- '7.4'

matrix:
include:
- php: '7.2'
- php: '7.3'
fast_finish: true
env:
- DB=mysql
- DB=mariadb

cache:
# Cache lives for 10 min
Expand All @@ -24,7 +23,12 @@ cache:
services:
- mysql

addons:
mariadb: '10.2'

install:
- php --version
- mysql --version
- composer install --dev --no-interaction --verbose
- cp .travis/env.travis.php env.php
- cp .travis/phpunit.travis.xml phpunit.xml
Expand All @@ -40,8 +44,83 @@ script:
after_failure:
- cat storage/logs/*.log

# Refer to: https://github.com/doctrine/dbal/blob/master/.travis.yml#L39
jobs:
include:
# Different test stages
# - stage: Test
# name: PHP 7.2 + MySQL 5.7
# php: 7.2
# env: DB=mysql
# services:
# - mysql
# - stage: Test
# name: PHP 7.3 + MySQL 5.7
# php: 7.3
# env: DB=mysql
# services:
# - mysql
# - stage: Test
# name: PHP 7.4 + MySQL 5.7
# php: 7.4
# env: DB=mysql
# services:
# - mysql
# - stage: Test
# name: PHP 7.2 + MariaDB 10.1
# php: 7.2
# env: DB=mariadb
# addons:
# mariadb: '10.1'
# - stage: Test
# name: PHP 7.3 + MariaDB 10.1
# php: 7.3
# env: DB=mariadb
# addons:
# mariadb: '10.1'
# - stage: Test
# name: PHP 7.4 + MariaDB 10.1
# php: 7.4
# env: DB=mariadb MARIADB_VERSION=10.1
# addons:
# mariadb: '10.1'
# - stage: Test
# name: PHP 7.2 + MariaDB 10.2
# php: 7.2
# env: DB=mariadb
# addons:
# mariadb: '10.2'
# - stage: Test
# name: PHP 7.3 + MariaDB 10.3
# php: 7.3
# env: DB=mariadb
# addons:
# mariadb: '10.2'
# - stage: Test
# name: PHP 7.4 + MariaDB 10.2
# php: 7.4
# env: DB=mariadb
# addons:
# mariadb: '10.2'
# - stage: Test
# name: PHP 7.2 + MariaDB 10.3
# php: 7.2
# env: DB=mariadb
# addons:
# mariadb: '10.3'
# - stage: Test
# name: PHP 7.3 + MariaDB 10.3
# php: 7.3
# env: DB=mariadb
# addons:
# mariadb: '10.3'
# - stage: Test
# name: PHP 7.4 + MariaDB 10.3
# php: 7.4
# env: DB=mariadb
# addons:
# mariadb: '10.3'

# Just packages up a release
- stage: package
script: skip
Expand Down
248 changes: 120 additions & 128 deletions .travis/deploy_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,139 +2,131 @@

if [ "$TRAVIS" = "true" ]; then

cd $TRAVIS_BUILD_DIR
cd $TRAVIS_BUILD_DIR

if test "$TRAVIS_TAG"; then
PKG_NAME=$TRAVIS_TAG
else
echo "On branch $TRAVIS_BRANCH"
if test "$TRAVIS_TAG"; then
PKG_NAME=$TRAVIS_TAG
VERSION=$TRAVIS_TAG

if [ "$TRAVIS_BRANCH" != "master" ] && [ "$TRAVIS_BRANCH" != "dev" ]; then
echo "Not on valid branch, exiting"
exit 0;
fi;
# Pass in the tag as the version to write out
php artisan phpvms:version --write $VERSION
else
echo "On branch $TRAVIS_BRANCH"

BASE_VERSION=$(php artisan phpvms:version --base-only)
PKG_NAME=${BASE_VERSION}-${TRAVIS_BRANCH}
if [ "$TRAVIS_BRANCH" != "master" ] && [ "$TRAVIS_BRANCH" != "dev" ]; then
echo "Not on valid branch, exiting"
exit 0
fi

FILE_NAME="phpvms-$PKG_NAME"
TAR_NAME="$FILE_NAME.tar.gz"
echo "Writing $TAR_NAME"
# Write the version out but place the branch ID in there
# This is only for the dev branch
BASE_VERSION=$(php artisan phpvms:version --base-only)

php artisan phpvms:version --write > VERSION
VERSION=$(cat VERSION)
echo "Version: $VERSION"

echo "Cleaning files"

rm -rf vendor
composer install --no-dev --prefer-dist --no-interaction --verbose

# Clean up the dependencies to remove some of the dev packages
# declare -a remove_packages=(
# 'barryvdh/laravel-ide-helper'
# 'bpocallaghan/generators'
# 'codedungeon/phpunit-result-printer'
# 'fzaninotto/faker'
# 'nikic/php-parser'
# 'phpstan/phpstan'
# 'phpunit/phpunit',
# 'weebly/phpstan-laravel'
# )
#
# for pkg in "${remove_packages[@]}"
# do
# composer --optimize-autoloader --no-interaction remove $pkg
# done

# Leftover individual files to delete
declare -a remove_files=(
.git
.github
.sass-cache
.idea
.travis
docker
tests
_ide_helper.php
.dpl
.editorconfig
.eslintignore
.eslintrc
.php_cs
.php_cs.cache
.phpstorm.meta.php
.styleci.yml
.phpunit.result.cache
env.php
intellij_style.xml
config.php
docker-compose.yml
Makefile
phpcs.xml
phpunit.xml
phpvms.iml
Procfile
phpstan.neon
node_modules
composer.phar
vendor/willdurand/geocoder/tests
)

for file in "${remove_files[@]}"
do
rm -rf $file
done

find ./vendor -type d -name ".git" -print0 | xargs rm -rf
find . -type d -name "sass-cache" -print0 | xargs rm -rf

# clear any app specific stuff that might have been loaded in
find storage/app -mindepth 1 -maxdepth 1 -not -name '.gitignore' -not -name public -not -name import -print0 -exec rm -rf {} +
find storage/app/public -mindepth 1 -maxdepth 1 -not -name '.gitignore' -not -name avatars -not -name uploads -print0 -exec rm -rf {} +
find storage/app/public/avatars -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/app/public/uploads -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/debugbar -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/docker -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/cache -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/sessions -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/views -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/logs -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +

mkdir -p storage/app/public/avatars
mkdir -p storage/app/public/uploads
mkdir -p storage/framework/cache
mkdir -p storage/framework/sessions
mkdir -p storage/framework/views

# Regenerate the autoloader and classes
composer dump-autoload
make clean

echo "Creating Tarball"
cd /tmp
tar -czf $TAR_NAME -C $TRAVIS_BUILD_DIR/../ phpvms
sha256sum $TAR_NAME > "$TAR_NAME.sha256"

echo "Uploading to S3"
mkdir -p $TRAVIS_BUILD_DIR/build
cd $TRAVIS_BUILD_DIR/build

mv "/tmp/$TAR_NAME" "/tmp/$TAR_NAME.sha256" .
artifacts upload --target-paths "/" $TAR_NAME $TRAVIS_BUILD_DIR/VERSION $TAR_NAME.sha256

# Upload the version for a tagged release. Move to a version file in different
# tags. Within phpVMS, we have an option of which version to track in the admin
if test "$TRAVIS_TAG"; then
echo "Uploading release version file"
cp "$TRAVIS_BUILD_DIR/VERSION" release_version
artifacts upload --target-paths "/" release_version
else
echo "Uploading ${TRAVIS_BRANCH}_version file"
cp $TRAVIS_BUILD_DIR/VERSION ${TRAVIS_BRANCH}_version
artifacts upload --target-paths "/" ${TRAVIS_BRANCH}_version
fi
# This now includes the pre-release version, so "-dev" by default
PKG_NAME=${BASE_VERSION}

curl -X POST --data "{\"content\": \"A new build is available at http://downloads.phpvms.net/$TAR_NAME ($VERSION)\"}" -H "Content-Type: application/json" $DISCORD_WEBHOOK_URL
# Don't pass in a version here, just write out the latest hash
php artisan phpvms:version --write >VERSION
VERSION=$(cat VERSION)
fi

echo "Version: $VERSION"
echo "Package name: $TAR_NAME"

FILE_NAME="phpvms-$PKG_NAME"
TAR_NAME="$FILE_NAME.tar.gz"

echo "Cleaning files"

rm -rf vendor
composer install --no-dev --prefer-dist --no-interaction --verbose

# Leftover individual files to delete
declare -a remove_files=(
.git
.github
.sass-cache
.idea
.travis
docker
_ide_helper.php
.dockerignore
.dpl
.editorconfig
.eslintignore
.eslintrc
.php_cs
.php_cs.cache
.phpstorm.meta.php
.styleci.yml
.phpunit.result.cache
env.php
intellij_style.xml
config.php
docker-compose.yml
Makefile
phpcs.xml
phpunit.xml
phpvms.iml
Procfile
phpstan.neon
node_modules
composer.phar
vendor/willdurand/geocoder/tests
)

for file in "${remove_files[@]}"; do
rm -rf $file
done

find ./vendor -type d -name ".git" -print0 | xargs rm -rf
find . -type d -name "sass-cache" -print0 | xargs rm -rf

# clear any app specific stuff that might have been loaded in
find bootstrap/cache -mindepth 1 -maxdepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/app -mindepth 1 -maxdepth 1 -not -name '.gitignore' -not -name public -not -name import -print0 -exec rm -rf {} +
find storage/app/public -mindepth 1 -maxdepth 1 -not -name '.gitignore' -not -name avatars -not -name uploads -print0 -exec rm -rf {} +
find storage/app/public/avatars -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/app/public/uploads -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/debugbar -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/docker -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/cache -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/sessions -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/framework/views -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
find storage/logs -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +

mkdir -p storage/app/public/avatars
mkdir -p storage/app/public/uploads
mkdir -p storage/framework/cache
mkdir -p storage/framework/sessions
mkdir -p storage/framework/views

# Regenerate the autoloader and classes
composer dump-autoload
make clean

cd /tmp
tar -czf $TAR_NAME -C $TRAVIS_BUILD_DIR/../ phpvms
sha256sum $TAR_NAME >"$TAR_NAME.sha256"

echo "Uploading to S3"
mkdir -p $TRAVIS_BUILD_DIR/build
cd $TRAVIS_BUILD_DIR/build

mv "/tmp/$TAR_NAME" "/tmp/$TAR_NAME.sha256" .
artifacts upload --target-paths "/" $TAR_NAME $TRAVIS_BUILD_DIR/VERSION $TAR_NAME.sha256

# Upload the version for a tagged release. Move to a version file in different
# tags. Within phpVMS, we have an option of which version to track in the admin
if test "$TRAVIS_TAG"; then
echo "Uploading release version file"
cp "$TRAVIS_BUILD_DIR/VERSION" release_version
artifacts upload --target-paths "/" release_version
else
echo "Uploading ${TRAVIS_BRANCH}_version file"
cp $TRAVIS_BUILD_DIR/VERSION ${TRAVIS_BRANCH}_version
artifacts upload --target-paths "/" ${TRAVIS_BRANCH}_version
fi

curl -X POST --data "{\"content\": \"A new build is available at http://downloads.phpvms.net/$TAR_NAME ($VERSION)\"}" -H "Content-Type: application/json" $DISCORD_WEBHOOK_URL
fi
Loading

0 comments on commit 073e48c

Please sign in to comment.