Adding apps with Git

Forums Submission Queue Adding apps with Git

This topic contains 9 replies, has 6 voices, and was last updated by  qnm 5 months, 3 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #587

    mjw
    Member

    I did finally learn to use git to add applications to the repository. Here is how I did it.

    1) Create an account at gitorious.org and set up git. I found a friendly how to about this on github.
    http://help.github.com/linux-set-up-git/
    Create an SSH key and upload it.
    https://help.github.com/articles/generating-ssh-keys

    2) Got to https://gitorious.org/f-droid/fdroiddata and press “clone”. This creates a child repository where you can apply your changes.

    3) Download your repository (~10mb). Open the Terminal to do so.
    git clone git@gitorious.org:~username/f-droid/your-repos-name.git

    4) Git should now download a folder which is named like your repository to your working directory. That’s the local copy you can work with. Change into that directory and go on with:
    git remote add upstream git://gitorious.org/f-droid/fdroiddata.git
    this creates a link to the official repository to sync with.

    5) Create a file in metadata/ called package.id.txt; there’s a file called template in there for reference. Check that the app builds and that the update check works by running
    fdroid build -p package.id and fdroid checkupdates -p package.id respectively. You can find more information about this in the manual.

    6) When you created and changed all the files you wanted to, open the Terminal again and go to your fdroiddata directory. Then do the following
    git add .
    this tells git that all files in the directory should be watched for changes.
    git commit -a
    this adds your changes to your local repository
    git push
    this sends the changes to your gitorious clone

    7) Go back go your repository at gitorious.org and check the changes made. If they are okay, press “request merge” (button at the right) and write a meaningful summary of your changes.
    You can check the status of your merge requests here

    8) Next time you want to change some files, type git pull upstream master before you start working to download the latest version of the files.

    #720

    tetris4
    Member

    thnx for this guide!

    I think I understand everything about the metadata files except the Version Code one:
    “For example:
    Build Version:0.12,3,651696a49be2cd7db5ce6a2fa8185e31f9a20035
    The above specifies to build version 0.12, which has a version code of 3.”

    Can someone explain what version code is and how to get it?

    eg: am trying to make a metadata file for this application: http://code.google.com/p/anstop/

    #724

    mjw
    Member

    The Version Code can be read from the AndroidManifest.xml file which should be found in the repository of the project. The file specifies details like the permissions a program needs and is needed for releasing the program in the Android Market.

    The Version Code is just an integer that makes clear which version is the most recent one.

    as an example:
    https://code.google.com/p/kiritakikoha/source/browse/AndroidManifest.xml

    #726

    tetris4
    Member

    thnx mjw for the quick response.

    So I will attempt to contribute my first file soon..

    I am trying now to see if I can manage to help on packaging applications for f-droid too.

    If there is any other information about that, other than the README file, do tell.

    thnx again!

    #727

    mjw
    Member

    I don’t think we need any special packaging. F-droid uses .apk files which are the standard way for distributing Android-applications.
    If you manage to add all the necessary build-information, the scripts should be able to create .apk packages from the source code.

    It’s always a great thing to have another helping hand for filling the repository and keeping it updated. Just ask as soon as new problems appear.

    greetings
    m.

    #2326

    mjw
    Member

    I just updated the post to fix some errors and point to the new data repository. Let me know if something is still unclear.

    #2349

    CiaranG
    Member

    That’s great, thanks for updating. I made this post sticky.

    #3897

    landroni
    Member

    Hello

    I am trying to sync my clone of the repo with ‘master’, but teh following fails:
    liv@liv-laptop:~/Build/f-droid/fdroiddata$ git pull upstream master
    fatal: ‘upstream’ does not appear to be a git repository
    fatal: The remote end hung up unexpectedly

    Am I doing something wrong?

    #3903

    daithib8
    Moderator

    Use the working with git thread on the development forum. We’ll keep this one short.

    Make sure you have the right url in fdroiddata/.git/config . Not the git@git… ssh url.

    #5406

    qnm
    Member

    Hi,

    Is there a VM I can use to test and debug builds?

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.