This is a quick guide for contrinuting code, fixes or develop native apps on Amahi.
- Join the amahi-devel list
- If you are new to git, you may find this interactive git tutorial a nice intro to git
- Install package:
yum install -y git
- If it's your first time, grab a copy of our main git repo
git clone email@example.com:amahi/platform.git
- If not, pull any changes from the master repo
cd platform (the root of the git tree) git pull
- Get yourself familiar with the pieces, and ask questions!
Testing your code
- Make some changes to the code, then test them, better yet, write tests for the code!
- e.g. for testing the platform:
and access it at http://hda:3000 you will probably want to turn off dhcp and dns if your server is on the same network as your home HDA
- You can see your changes with two git tools: status and diff
- The status gives you a list of what files were modified, added or removed. you can see changes in your area with:
git diff --cached
- When you know you want to modify a file, you add it to the changes to be committed, for example, say a README file:
git add README
- For the parts that are added and checked in, you can see the changes with
- This is what will be committed!
- Then actually commit your changes to your git repo:
- After that you can generate a patch to be sent upstream, e.g. for a patch of the latest commit.:
1. Go into the patch folder located in the root of the git tree. 2. git format-patch HEAD^..HEAD
NOTE: When creating the patch title(first line) please put it in YYMMDD-PATCHSEQUENCE#-long-patch-name.patch format. In the long name please include what module you are working on. AKA what application etc..
- This will generate a file called 0001-my-patch.mbox or similar (type ls -l 00*), which then you can email or pastebin it to someone to be committed upstream. You probably want to configure Git to your liking first to display the email properly.
- Please note, once the patch is applied upstream, your name and email WILL be officially in the amahi git repo as as contributor, which mean it's in the open and it's crawlable, so please use your PUBLIC name/email accordingly.