Code Monkey home page Code Monkey logo

lukav-kodi-repo's Introduction

Almost "Instant" Kodi Addon Repository

Almost instant but not quite (/understatement)

Travis

Features

  • Auto generates your personal Kodi addon repository hosted on GitHub
  • Auto updates everytime you update your addon code
  • Auto generates a repository addon zip for your new personal repository

Demo

Get Started

These instructions require you to have a bash environment and git installed. Most Linux and Mac machines will already have these available by default. For Windows, you probably should install the Git for Windows and run the commands from Git Bash.

These instructions will be a 100x easier if you have a basic understanding of Git.

  1. Create a new GitHub repository with the files from this repo or just fork this one if you don't care about names and such

  2. Create an account at Travis and add your project to Travis: https://travis-ci.org/profile/

  3. In terminal (or Git Bash), clone your repo locally

    git clone [email protected]:YOUR_USER_NAME/YOUR_REPO_NAME.git my_kodi_repo
    cd my_kodi_repo
    
  4. Generate a GitHub deploy key

    ssh-keygen -q -t ed25519 -C 'put-your-repo-name-here' -f deploy_key -N ''
    

    If successful, you will see 2 files deploy_key and deploy_key.pub in the folder.

  5. Copy the contents of the text file deploy_key.pub and set it as a new Deploy key for your project https://github.com/<your name>/<your repo>/settings/keys. Remember to allow write access.

  6. Install the travis CLI client

  7. From the Terminal, login with the travis cli

    travis login
    
  8. Use travis to encrypt your deploy_key and save the encrypted key as .github/deploy_key.enc

    # or go to where your repo folder is
    cd my_kodi_repo && rm .github/deploy_key.enc
    travis encrypt-file deploy_key .github/deploy_key.enc

    You should see something like

    encrypting deploy_key for yourname/your-repo-project
    storing result as deploy_key.enc
    storing secure env variables for decryption
    
    Please add the following to your build script (before_install stage in your .travis.yml, for instance):
    
        openssl aes-256-cbc -K $encrypted_0a6446eb3ae3_key -iv $encrypted_0a6446eb3ae3_key -in super_secret.txt.enc -out super_secret.txt -d
    
    Pro Tip: You can add it automatically by running with --add.
    
    Make sure to add deploy_key.enc to the git repository.
    Make sure not to add deploy_key to the git repository.
    Commit all changes to your .travis.yml.
    

    Look for the "encryption label". For example, in the output above, 0a6446eb3ae3 is the encryption label.

  9. Take the encryption label from the previous step and set it in the file .travis.yml. Take this chance to also set your email address in .travis.yml

  10. Add your addon source code folders into the src/ folder so that it looks like

    - src/
        - your.addon.folder.one/
        - your.addon.folder.two/
    
  11. Git add your changes and new files and push it to your repo.

    git add -A .
    git push
    
  12. If nothing goes wrong, you will have a personal Kodi addon repository at https://your_user_name.github.io/your_repo_name/ in a few minutes.

Advance Usage

By default, only the master branch is built to create an addons repository compatible with Krypton (minversion="17.0.0").

You can change this by customising .github/config.json and .travis.yml.

For example, to make your repo only for Leia, edit .github/config.json to look like

{
    "branchmap": [
        {
            "name": "master",
            "minversion": "17.9.0"
        }
    ]
}

If you have different branches for different Kodi versions:

.github/config.json

{
    "branchmap": [
        {
            "name": "master",
            "minversion": "17.9.0"
        },
        {
            "name": "krypton",
            "minversion": "17.0.0"
        }
    ]
}

.travis.yml

branches:
  only:
    - master
    - krypton

lukav-kodi-repo's People

Contributors

lukavia avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.