› 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.
-
AuthorPosts
-
April 27, 2011 at 2:26 pm #587
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-keys2) 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.git4) 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.idandfdroid checkupdates -p package.idrespectively. 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 clone7) 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 here8) Next time you want to change some files, type
git pull upstream masterbefore you start working to download the latest version of the files.July 3, 2011 at 12:06 pm #720thnx 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/
July 3, 2011 at 8:48 pm #724The 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.xmlJuly 4, 2011 at 11:42 am #726thnx 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!
July 4, 2011 at 4:31 pm #727I 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.June 20, 2012 at 10:18 am #2326I just updated the post to fix some errors and point to the new data repository. Let me know if something is still unclear.
June 21, 2012 at 12:16 pm #2349That’s great, thanks for updating. I made this post sticky.
September 10, 2012 at 7:53 pm #3897Hello
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 unexpectedlyAm I doing something wrong?
September 10, 2012 at 9:20 pm #3903Use 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.
December 3, 2012 at 8:58 pm #5406Hi,
Is there a VM I can use to test and debug builds?
-
AuthorPosts
You must be logged in to reply to this topic.
