项目作者: adrianorsouza

项目描述 :
Check package and frameworks versions within projects running in production.
高级语言: PHP
项目地址: git://github.com/adrianorsouza/compare-system-versions.git
创建时间: 2020-07-23T00:19:39Z
项目社区:https://github.com/adrianorsouza/compare-system-versions

开源协议:BSD 3-Clause "New" or "Revised" License

下载


Compare System Versions

Check package and frameworks versions within projects running in production.

This library look up on each project and scan for composer.json and package.json
files to check if the versions of its installed packages are outdated.

Screenshot

Setup

Create a fresh composer project then install this project.

  1. mkdir /var/www/compare-system-versions
  2. composer init
  3. git init
  4. echo "/vendor/" > .gitignore
  5. git add .gitignore
  6. git commit -m "First Commit"

Install

Download the latest release csv.phar.

  1. curl -Lo csv https://github.com/adrianorsouza/compare-system-versions/releases/download/v0.1.0/csv.phar
  2. chmod +x csv
  3. sudo mv csv /usr/local/bin/

Config

First Create a config YAML file config.yaml:

  1. system_versions:
  2. latest:
  3. php: 7.4.7
  4. nginx: 1.18.0
  5. mysql: 8.0.20
  6. platform: Ubuntu 20.04 LTS (Focal Fossa)
  7. current:
  8. php: 7.3.1
  9. nginx: 1.16.0
  10. mysql: 8.0.20
  11. platform: Ubuntu 18.04 LTS (Bionic Beaver)
  12. package_versions:
  13. latest:
  14. phpunit: 9.2.0
  15. laravel: 7.18.0
  16. react: 16.13.1
  17. grunt: 1.2.1
  18. iterator:
  19. dir: /var/www
  20. packages:
  21. - composer.lock
  22. - package-lock.json
  23. - bower.json
  24. exclude:
  25. - bower_components
  26. - node_modules
  27. - public
  28. - public_html
  29. - vendor
  30. - compare-system-versions
  31. options:
  32. title: System Versions Compare
  33. build_dir: public/

Usage

  1. php csv.phar update config.yaml

NOTES ABOUT CONFIG:

  • build_dir are always relative to the current directory, so don’t define it as absolute path.

The code above will scan for projects within /var/www dir and get the versions for packages and versions like:

  • PHP
  • Ubuntu
  • Laravel Framework
  • ReactJS Framework
  • GruntJS Task Runner

Develop

Generate a phar file:

  1. box compile

Author

Adriano Rosa (https://adrianorosa.com)

Licence

Copyright © 2020, Adriano Rosa info@adrianorosa.com
All rights reserved.

For the full copyright and license information, please view the LICENSE
file that was distributed within the source root of this project.