owncloud/ocdev — pull request #17 by Raydiation (2014-12-05 13:53:03+00:00)
Title: Appstore plugin

WIP :construction:

#14

The goal is to add the following commands ([] means optional) :

ocdev appstore [release] [--archivedir=/home/ray/news.tar.gz]

This works in the following way: If the \ tag is not present in the info.xml, it takes the archive and creates a new app on the appstore, then gets the ocsid and tells the dev to add \$id\ to the info.xml. If the ocsid is present, it will update the app on the appstore

The archivedir defaults to the **current directory** + **build/artifacts/appstore/appdirectoryname.tar.gz**

The **appname** is extracted from the string before **.tar.gz** which is **appdirectoryname** in our case

From this archive we read the **appname/appinfo/info.xml** and parse the following sections required for the upload to store (* means required):
* version *
* requiremin/require *
* requiremax
* description *
* author *
* name *
* license *
* ocsid
* homepage (new)
* category (new)
* bugs (new)
* repository (new)

An example of the new markup is in the News app: https://github.com/owncloud/news/blob/master/appinfo/info.xml#L8

tar.gz is the only planned supported format (for now) since we can add a Makefile very easily to the app templates that builds a tar.gz file so the plan is to integrate ocdev into the Makefile

So the planned workflow for app devs when they are ready for a new release is to run:

make appstore

which automatically builds the tar.gz archive (already working like here https://github.com/owncloud/news/blob/master/Makefile#L23) and uploads it to the appstore.

PS: Credentials are read from ~/.ocdevrc which is automatically created if it does not exist containing the following contents:

```ini
[appstore]
password =
user =
url = http://apps.owncloud.com/
```

In the future we could also add user + email for the startapp command to not require the command line parameters every time

@PVince81 @MorrisJobke @mmattel @nickvergessen @wakeup @jbtbnl