Skip to content

lukavia/lukav-kodi-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published