build/controllers/ReleaseController.php
public function actionPackage(array $what)
    {
        $this->validateWhat($what, ['app']);
        $versions = $this->getCurrentVersions($what);

        $this->stdout("You are about to generate packages for the following things:\n\n");
        foreach ($what as $ext) {
            if (strncmp('app-', $ext, 4) === 0) {
                $this->stdout(' - ');
                $this->stdout(substr($ext, 4), Console::FG_RED);
                $this->stdout(' application version ');
            } elseif ($ext === 'framework') {
                $this->stdout(' - Yii Framework version ');
            } else {
                $this->stdout(' - ');
                $this->stdout($ext, Console::FG_RED);
                $this->stdout(' extension version ');
            }
            $this->stdout($versions[$ext], Console::BOLD);
            $this->stdout("\n");
        }
        $this->stdout("\n");

        $packagePath = "{$this->basePath}/packages";
        $this->stdout("Packages will be stored in $packagePath\n\n");

        if (!$this->confirm('Continue?', false)) {
            $this->stdout("Canceled.\n");
            return 1;
        }

        foreach ($what as $ext) {
            if ($ext === 'framework') {
                throw new Exception('Can not package framework.');
            } elseif (strncmp('app-', $ext, 4) === 0) {
                $this->packageApplication(substr($ext, 4), $versions[$ext], $packagePath);
            } else {
                throw new Exception('Can not package extension.');
            }
        }

        $this->stdout("\ndone. verify the versions composer installed above and push it to github!\n\n");

        return 0;
    }
public function actionPackage(array $what)
    {
        $this->validateWhat($what, ['app']);
        $versions = $this->getCurrentVersions($what);

        $this->stdout("You are about to generate packages for the following things:\n\n");
        foreach ($what as $ext) {
            if (strncmp('app-', $ext, 4) === 0) {
                $this->stdout(' - ');
                $this->stdout(substr($ext, 4), Console::FG_RED);
                $this->stdout(' application version ');
            } elseif ($ext === 'framework') {
                $this->stdout(' - Yii Framework version ');
            } else {
                $this->stdout(' - ');
                $this->stdout($ext, Console::FG_RED);
                $this->stdout(' extension version ');
            }
            $this->stdout($versions[$ext], Console::BOLD);
            $this->stdout("\n");
        }
        $this->stdout("\n");

        $packagePath = "{$this->basePath}/packages";
        $this->stdout("Packages will be stored in $packagePath\n\n");

        if (!$this->confirm('Continue?', false)) {
            $this->stdout("Canceled.\n");
            return 1;
        }

        foreach ($what as $ext) {
            if ($ext === 'framework') {
                throw new Exception('Can not package framework.');
            } elseif (strncmp('app-', $ext, 4) === 0) {
                $this->packageApplication(substr($ext, 4), $versions[$ext], $packagePath);
            } else {
                throw new Exception('Can not package extension.');
            }
        }

        $this->stdout("\ndone. verify the versions composer installed above and push it to github!\n\n");

        return 0;
    }
public function actionPackage ( array $ what ) { $ this -> validateWhat ( $ what , [ 'app' ] ) ; $ versions = $ this -> getCurrentVersions ( $ what ) ; $ this -> stdout ( "You are about to generate packages for the following things:\n\n" ) ; foreach ( $ what as $ ext ) { if ( strncmp ( 'app-' , $ ext , 4 ) === 0 ) { $ this -> stdout ( ' - ' ) ; $ this -> stdout ( substr ( $ ext , 4 ) , Console :: FG_RED ) ; $ this -> stdout ( ' application version ' ) ; } elseif ( $ ext === 'framework' ) { $ this -> stdout ( ' - Yii Framework version ' ) ; } else { $ this -> stdout ( ' - ' ) ; $ this -> stdout ( $ ext , Console :: FG_RED ) ; $ this -> stdout ( ' extension version ' ) ; } $ this -> stdout ( $ versions [ $ ext ] , Console :: BOLD ) ; $ this -> stdout ( "\n" ) ; } $ this -> stdout ( "\n" ) ; $ packagePath = "{$this->basePath}/packages" ; $ this -> stdout ( "Packages will be stored in $packagePath\n\n" ) ; if ( ! $ this -> confirm ( 'Continue?' , false ) ) { $ this -> stdout ( "Canceled.\n" ) ; return 1 ; } foreach ( $ what as $ ext ) { if ( $ ext === 'framework' ) { throw new Exception ( 'Can not package framework.' ) ; } elseif ( strncmp ( 'app-' , $ ext , 4 ) === 0 ) { $ this -> packageApplication ( substr ( $ ext , 4 ) , $ versions [ $ ext ] , $ packagePath ) ; } else { throw new Exception ( 'Can not package extension.' ) ; } } $ this -> stdout ( "\ndone. verify the versions composer installed above and push it to github!\n\n" ) ; return 0 ; }
This will generate application packages for download page.

Usage:

```
./build/build release/package app-basic
```

@param array $what what do you want to package? this can either be:

- an application indicated by prefix `app-`, e.g. `app-basic`,

@return int
This will generate application packages for download page .