berty / yolo

over-the-air installation and testing of mobile applications (TestFlight alternative)
https://yolo.berty.io/
Other
97 stars 15 forks source link

Define a format to attach custom metadata with releases #35

Open moul opened 4 years ago

moul commented 4 years ago

The idea is to create a file format that will be uploaded alongisde the .apk, .ipa etc to add some metadata (branch, author, version, builddate, etc) that can be used to enhance the UI with more info or to create a new API call allowing the apps to automatically find "more recent builds" automatically

moul commented 4 years ago

cc @aeddi @gfanton @n0izn0iz what do you suggest?

anyway, this file should be optional, but in the case of bintray which is not necessarily linked with github, it can be a good way to keep track of related branch/commit etc

aeddi commented 4 years ago

I don't think there's a standard format, but you can take a look at maven method. Next to each artifact, a maven-metadata.xml file is created containing some info about it. For example on gomobile-ipfs-android repo:

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>ipfs.gomobile</groupId>
  <artifactId>core</artifactId>
  <version>0.0.1</version>
  <versioning>
    <latest>0.0.1</latest>
    <release>0.0.1</release>
    <versions>
      <version>0.0.1</version>
    </versions>
    <lastUpdated>20200302132150</lastUpdated>
  </versioning>
</metadata>

(You can check here)

aeddi commented 4 years ago

But please, don't use xml 🙏

moul commented 4 years ago

are you aware of equivalent of maven-metadata.xml files in other ecosystems?

aeddi commented 4 years ago

Depends on what you want. Basically maven-metadata is used mostly I guess by the dependency manager (find a specific version of an artifact, its last version, etc...). If you want richer info about a package, (like author, website, description, etc...) on Maven the pom file format is used.

Again on gomobile-ipfs-android repo for example:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <groupId>ipfs.gomobile</groupId>
  <artifactId>core</artifactId>
  <version>0.0.1</version>
  <packaging>aar</packaging>

  <name>Gomobile-IPFS - Android Core</name>
  <description>Android Gomobile package exposing go-ipfs methods required by Gomobile-IPFS-Bridge</description>
  <url>https://github.com/ipfs-shipyard/gomobile-ipfs</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
    <license>
      <name>MIT License</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>aeddi</id>
      <name>Antoine Eddi</name>
      <email>antoine.e.b@gmail.com</email>
      <organization>Berty Technologies</organization>
      <organizationUrl>https://berty.tech</organizationUrl>
    </developer>
    <developer>
      <id>gfanton</id>
      <name>Guilhem Fanton</name>
      <email>guilhem.fanton@gmail.com</email>
      <organization>Berty Technologies</organization>
      <organizationUrl>https://berty.tech</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/ipfs-shipyard/gomobile-ipfs.git</connection>
    <developerConnection>scm:git:ssh://github.com:ipfs-shipyard/gomobile-ipfs.git</developerConnection>
    <url>https://github.com/ipfs-shipyard/gomobile-ipfs/tree/master</url>
  </scm>
</project>

For Cocoapods you can check the podspec file format.

moul commented 4 years ago

there are basically two places where we want to add optional metadata:

examples of info: