keep version numbers in their own files for faster reading

This commit is contained in:
Robin Appelman 2012-04-14 16:27:58 +02:00
parent bfdbdd9b20
commit 926b2b78fe
43 changed files with 37 additions and 24 deletions

View File

@ -2,7 +2,6 @@
<info> <info>
<id>admin_dependencies_chk</id> <id>admin_dependencies_chk</id>
<name>Owncloud dependencies info</name> <name>Owncloud dependencies info</name>
<version>0.01</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Brice Maron (eMerzh)</author> <author>Brice Maron (eMerzh)</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.01

View File

@ -3,7 +3,6 @@
<id>admin_migrate</id> <id>admin_migrate</id>
<name>ownCloud Instance Migration</name> <name>ownCloud Instance Migration</name>
<description>Import/Export your owncloud instance</description> <description>Import/Export your owncloud instance</description>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Thomas Schmidt and Tom Needham</author> <author>Thomas Schmidt and Tom Needham</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>bookmarks</id> <id>bookmarks</id>
<name>Bookmarks</name> <name>Bookmarks</name>
<description>Bookmark manager for ownCloud</description> <description>Bookmark manager for ownCloud</description>
<version>0.2</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Arthur Schiwon, Marvin Thomas Rabe</author> <author>Arthur Schiwon, Marvin Thomas Rabe</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.2

View File

@ -2,7 +2,6 @@
<info> <info>
<id>calendar</id> <id>calendar</id>
<name>Calendar</name> <name>Calendar</name>
<version>0.2.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Georg Ehrke, Bart Visscher, Jakob Sack</author> <author>Georg Ehrke, Bart Visscher, Jakob Sack</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.2.1

View File

@ -2,7 +2,6 @@
<info> <info>
<id>contacts</id> <id>contacts</id>
<name>Contacts</name> <name>Contacts</name>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Jakob Sack</author> <author>Jakob Sack</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>external</id> <id>external</id>
<name>External</name> <name>External</name>
<description>Show external Application in the ownCloud menu</description> <description>Show external Application in the ownCloud menu</description>
<version>1.0</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Frank Karlitschek</author> <author>Frank Karlitschek</author>
<require>2</require> <require>2</require>

1
apps/external/appinfo/version vendored Normal file
View File

@ -0,0 +1 @@
1.0

View File

@ -3,7 +3,6 @@
<id>files_archive</id> <id>files_archive</id>
<name>Archive support</name> <name>Archive support</name>
<description>Transparent opening of archives</description> <description>Transparent opening of archives</description>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman</author> <author>Robin Appelman</author>
<require>3</require> <require>3</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_encryption</id> <id>files_encryption</id>
<name>Encryption</name> <name>Encryption</name>
<description>Server side encryption of files</description> <description>Server side encryption of files</description>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman</author> <author>Robin Appelman</author>
<require>3</require> <require>3</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_external</id> <id>files_external</id>
<name>External storage support</name> <name>External storage support</name>
<description>Mount external storage sources</description> <description>Mount external storage sources</description>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman</author> <author>Robin Appelman</author>
<require>3</require> <require>3</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_imageviewer</id> <id>files_imageviewer</id>
<name>Image Viewer</name> <name>Image Viewer</name>
<description>Simple image viewer for owncloud</description> <description>Simple image viewer for owncloud</description>
<version>1.0</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman</author> <author>Robin Appelman</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
1.0

View File

@ -3,7 +3,6 @@
<id>files_pdfviewer</id> <id>files_pdfviewer</id>
<name>PDF Viewer</name> <name>PDF Viewer</name>
<description>Inline PDF viewer (pdfjs-based)</description> <description>Inline PDF viewer (pdfjs-based)</description>
<version>0.1</version>
<licence>GPL</licence> <licence>GPL</licence>
<author>Joan Creus</author> <author>Joan Creus</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_sharing</id> <id>files_sharing</id>
<name>Share Files</name> <name>Share Files</name>
<description>File sharing between users</description> <description>File sharing between users</description>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Michael Gapczynski</author> <author>Michael Gapczynski</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_texteditor</id> <id>files_texteditor</id>
<name>Text Editor</name> <name>Text Editor</name>
<description>Simple plain text editor based on Ace editor.</description> <description>Simple plain text editor based on Ace editor.</description>
<version>0.3</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Tom Needham</author> <author>Tom Needham</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.3

View File

@ -2,7 +2,6 @@
<info> <info>
<id>files_versioning</id> <id>files_versioning</id>
<name>Versioning and Backup</name> <name>Versioning and Backup</name>
<version>1.0.0</version>
<licence>GPLv2</licence> <licence>GPLv2</licence>
<author>Craig Roberts</author> <author>Craig Roberts</author>
<require>3</require> <require>3</require>

View File

@ -0,0 +1 @@
1.0.0

View File

@ -2,7 +2,6 @@
<info> <info>
<id>gallery</id> <id>gallery</id>
<name>Pictures</name> <name>Pictures</name>
<version>0.4</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Bartek Przybylski</author> <author>Bartek Przybylski</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.4

View File

@ -3,7 +3,6 @@
<id>media</id> <id>media</id>
<name>Media</name> <name>Media</name>
<description>Media player and server for ownCloud</description> <description>Media player and server for ownCloud</description>
<version>0.3</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman</author> <author>Robin Appelman</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.3

View File

@ -3,7 +3,6 @@
<id>remoteStorage</id> <id>remoteStorage</id>
<name>remoteStorage compatibility</name> <name>remoteStorage compatibility</name>
<description>Enables you to use ownCloud as their remote storage for unhosted applications. This app requires the Webfinger app to be installed and enabled correctly. More info on <a href="http://unhosted.org">the website of the unhosted movement</a>.</description> <description>Enables you to use ownCloud as their remote storage for unhosted applications. This app requires the Webfinger app to be installed and enabled correctly. More info on <a href="http://unhosted.org">the website of the unhosted movement</a>.</description>
<version>0.6</version>
<licence>AGPL or MIT</licence> <licence>AGPL or MIT</licence>
<author>Michiel de Jong</author> <author>Michiel de Jong</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.6

View File

@ -3,7 +3,6 @@
<id>user_ldap</id> <id>user_ldap</id>
<name>LDAP user backend</name> <name>LDAP user backend</name>
<description>Authenticate Users by LDAP</description> <description>Authenticate Users by LDAP</description>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Dominik Schmidt</author> <author>Dominik Schmidt</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>user_migrate</id> <id>user_migrate</id>
<name>User Account Migration</name> <name>User Account Migration</name>
<description>Migrate your user accounts</description> <description>Migrate your user accounts</description>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Tom Needham</author> <author>Tom Needham</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>user_openid</id> <id>user_openid</id>
<name>OpenID user backend</name> <name>OpenID user backend</name>
<description>Allow login through OpenID</description> <description>Allow login through OpenID</description>
<version>0.1</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman</author> <author>Robin Appelman</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>user_webfinger</id> <id>user_webfinger</id>
<name>Webfinger</name> <name>Webfinger</name>
<description>Provide WebFinger for all users so they get a user address like user@owncloudinstance which can be used for external applications. Other apps can provide information for webfinger requests, such as remoteStorage compatibility.</description> <description>Provide WebFinger for all users so they get a user address like user@owncloudinstance which can be used for external applications. Other apps can provide information for webfinger requests, such as remoteStorage compatibility.</description>
<version>0.3</version>
<licence>AGPL or MIT</licence> <licence>AGPL or MIT</licence>
<author>Michiel de Jong, Florian Hülsmann</author> <author>Michiel de Jong, Florian Hülsmann</author>
<require>2</require> <require>2</require>

View File

@ -0,0 +1 @@
0.3

View File

@ -307,6 +307,20 @@ class OC_App{
return $list; return $list;
} }
/**
* get the last version of the app, either from appinfo/version or from appinfo/info.xml
*/
public static function getAppVersion($appid){
$file=OC::$APPSROOT.'/apps/'.$appid.'/appinfo/version';
$version=@file_get_contents($file);
if($version){
return $version;
}else{
$appData=self::getAppInfo($appid);
return $appData['version'];
}
}
/** /**
* @brief Read app metadata from the info.xml file * @brief Read app metadata from the info.xml file
@ -441,9 +455,8 @@ class OC_App{
// The rest comes here // The rest comes here
$versions = self::getAppVersions(); $versions = self::getAppVersions();
foreach( $versions as $app=>$installedVersion ){ foreach( $versions as $app=>$installedVersion ){
$appInfo=OC_App::getAppInfo($app); $currentVersion=OC_App::getAppVersion($app);
if (isset($appInfo['version'])) { if ($currentVersion) {
$currentVersion=$appInfo['version'];
if (version_compare($currentVersion, $installedVersion, '>')) { if (version_compare($currentVersion, $installedVersion, '>')) {
OC_App::updateApp($app); OC_App::updateApp($app);
OC_Appconfig::setValue($app,'installed_version',$appInfo['version']); OC_Appconfig::setValue($app,'installed_version',$appInfo['version']);