miércoles, 11 de abril de 2018

Publish / Share / Register your own library in PlatformIO Library Registry

Step 1: publish your project on github

You must first create your manifest file that must be called "library.json" and it must be in the root of the project


In my case it has the following structure:

{
  "name": "EasyOta",
  "keywords": "ota, over,to, air,esp8266",
  "description": " The easiest way to implement ota on an esp8266 based chip using an HTTP server",
  "repository":
  {
    "type": "git",
    "url": "https://github.com/Eitol/EasyOta.git"
  },
  "authors":
  [
    {
      "name": "Hector Oliveros",
      "email": "hector.oliveros.leon@gmail.com",
      "maintainer": true
    }
  ],
  "license": "MIT",
  "version": "1.0",
  "frameworks": "arduino",
  "platforms": "espressif8266"
}



Step 2: copy the url of the raw project

The url is some like this:
https://raw.githubusercontent.com/GITHUB_USER/PROJECT/master/library.json

Example:

For my project with url = https://github.com/Eitol/EasyOta

Then, the url is:

https://raw.githubusercontent.com/Eitol/EasyOta/master/library.json



Step 3: Use the url to register your library

The command is:

platformio lib register [MANIFEST_URL]

example:

platformio lib register https://raw.githubusercontent.com/Eitol/EasyOta/master/library.json


No hay comentarios:

Publicar un comentario