2017 © Pedro Peláez
 

library yii2-updater

Updater for Sitko.ru Yii2 projects

image

sitkoru/yii2-updater

Updater for Sitko.ru Yii2 projects

  • Monday, August 28, 2017
  • by SonicGD
  • Repository
  • 2 Watchers
  • 0 Stars
  • 242 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Add, (*1)

"sitkoru/yii2-updater": "dev-master"

to require section of your composer.json, (*2)

Enable module in console app config:, (*3)

    'modules'=>[
    ...
        'updater'   => [
            'class'           => \sitkoru\updater\Module::className(), //module class name
            'path'            => dirname(dirname(__DIR__)), //path to app
            'versionFilePath' => 'version.php', //path to file to store version. Include this file in your app.
            'currentVersion'  => defined('APP_VERSION') ? APP_VERSION : 0.0, //current version. If empty, updater will try to get it from versionFile
            'versionConstant' => 'APP_VERSION', //constant name to store version
            'releasePrefix'   => "origin/release-", //prefix to identify release branches in git
            'assetsCommands'  => [ //commands for publish assets
                "./yii asset/compress app/config/main.assets.php app/config/bundles.php" //for example
            ],
            'customCommands'  => [ //commands for custom operations, like starting daemons or something else
                "nodejs bin/chat.js" //for example
            ]
        ],
    ...
    ]

Other options you can see in Module.php, (*4)

Run, (*5)

./yii updater/release

and follow instructions =), (*6)

Notice:

Updater override yii's migrate functions to mark migrations with app version. Some advices:, (*7)

  1. Don't use it in dev mode =), (*8)

  2. Don't use ./yii migrate on production, (*9)

  3. If you need to manually apply migrations, use ./yii updater/migrations/up 0 1.1 //replace 1.1 with real version, (*10)

The Versions

28/08 2017

dev-master

9999999-dev

Updater for Sitko.ru Yii2 projects

  Sources   Download

MIT

The Requires

 

yii2 sitkoru cg2

18/12 2015

2.x-dev

2.9999999.9999999.9999999-dev

Updater for Sitko.ru Yii2 projects

  Sources   Download

MIT

The Requires

 

yii2 sitkoru cg2