| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| // |
| |
| === Github Contributions |
| |
| Some people prefer to make contributions to karaf source via github. If you are one of them, this is for you! |
| |
| ==== Introduction |
| |
| Apache Karaf is available as a periodically replicated mirror on: https://github.com/apache/karaf |
| |
| ==== Suggested Workflow |
| |
| . Make a fork of karaf repo github mirror |
| . Do all your new work on your own karaf fork |
| . When ready, file a Jira issue https://issues.apache.org/jira/browse/KARAF, attach the link to your github pull request, and ask for a review |
| . One of karaf committers will discuss your pull request on github; and at some point your pull request will be accepted |
| . When your pull request is accepted, squash it into a single commit and attach single patch file to the original jira, with ASF grant check box selected |
| . Now pray to your favorite ASF committer to really accept the patch :-) |
| . When your patch is committed to the svn, and you can verify it in the latest karaf snapshot, close your pull request on github |
| |
| ==== License Reminder |
| |
| In order for your contributions to be accepted: |
| |
| * All files must contain ASL license grant header |
| * You must select ASF grant check box when attaching patch to the jira |
| |
| ==== How to Generate a One-File-Patch Via Throw-Away Branch |
| |
| Here is one way to generate squash of your commits: |
| |
| http://stackoverflow.com/questions/616556/how-do-you-squash-commits-into-one-patch-with-git-format-patch |
| |
| ---- |
| # |
| # 'archon' referers to karaf mirror |
| # 'origin' referers to your own fork |
| # |
| |
| # attach karaf mirror as remote, if not done yet |
| git remote add archon https://github.com/apache/karaf |
| |
| # fetch latest karaf mirror |
| git fetch archon |
| |
| # ensure you are on your fork trunk |
| git checkout origin/trunk |
| |
| # kill previous patch delivery, if you had one |
| git branch -D delivery |
| |
| # make new delivery throw-away branch, based on latest karaf mirror |
| git branch delivery archon/trunk |
| |
| # use it |
| git checkout delivery |
| |
| # squash all your local development into a single commit |
| git merge --squash trunk |
| |
| # commit it to the delivery branch |
| git commit -m "delivery" |
| |
| # generate a patch file against the mirror |
| git format-patch archon/trunk |
| |
| ---- |
| |
| root of your Karaf source now contains a file named "0001-delivery.patch.txt" (please attach the .txt ending;this will allow commiters to open your patch directly in the browser and give it a short look there) which you should attach to your karaf jira, and ask to commit to the svn trunk |