瀏覽代碼

Merge remote-tracking branch 'origin/master' into solr

* origin/master:
  Added missing asset publishing step to the installation instructions.
  Avoid updating newer versions in case of version conflict
Igor Wiedler 13 年之前
父節點
當前提交
35ad0c5b6b
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 1 0
      README.md
  2. 4 0
      src/Packagist/WebBundle/Command/UpdatePackagesCommand.php

+ 1 - 0
README.md

@@ -10,5 +10,6 @@ Installation
 - Run `bin/vendors install` to get all the vendors.
 - Run `bin/vendors install` to get all the vendors.
 - Copy `app/config/parameters.yml.dist` to `app/config/parameters.yml` and edit the relevant values for your setup.
 - Copy `app/config/parameters.yml.dist` to `app/config/parameters.yml` and edit the relevant values for your setup.
 - Run `app/console doctrine:schema:create` to setup the DB.
 - Run `app/console doctrine:schema:create` to setup the DB.
+- Run `app/console assets:install web` to deploy the assets on the web dir.
 - Make a VirtualHost with DocumentRoot pointing to web/
 - Make a VirtualHost with DocumentRoot pointing to web/
 - You should now be able to access the site, create a user, etc.
 - You should now be able to access the site, create a user, etc.

+ 4 - 0
src/Packagist/WebBundle/Command/UpdatePackagesCommand.php

@@ -158,6 +158,10 @@ EOF
         // check if we have that version yet
         // check if we have that version yet
         foreach ($package->getVersions() as $existingVersion) {
         foreach ($package->getVersions() as $existingVersion) {
             if ($existingVersion->equals($version)) {
             if ($existingVersion->equals($version)) {
+                // avoid updating newer versions, in case two branches have the same version in their composer.json
+                if ($existingVersion->getReleasedAt() > $data->getReleaseDate()) {
+                    return;
+                }
                 if ($existingVersion->getDevelopment()) {
                 if ($existingVersion->getDevelopment()) {
                     $version = $existingVersion;
                     $version = $existingVersion;
                     break;
                     break;