From Fedora Project Wiki

Line 37: Line 37:
==Using GIT with Features==
==Using GIT with Features==


1. Clone our Features repository
<ol><li>Clone our Features repository
<pre>git clone ssh://git.fedorahosted.org/git/fedora-insight-features.git</pre>
<pre>git clone ssh://git.fedorahosted.org/git/fedora-insight-features.git</pre></li>


2. Change the directory
<li>Make a new branch for your work
<pre>cd fedora-insight-features</pre>
<pre>git checkout -b my-new-feature</pre></li>


3. Make a new directory
<li>Change the directory
<pre>mkdir my_awesome_feature</pre>
<pre>cd fedora-insight-features</pre></li>


4. Copy your feature files
<li>Make a new directory
<pre>cp path/to/my/feature/* ./my_awesome_feature/</pre>
<pre>mkdir my_awesome_feature</pre></li>


5. Add the directory of feature
<li>Copy your feature files
<pre>git add my_awesome_feature/</pre>
<pre>cp path/to/my/feature/* ./my_awesome_feature/</pre></li>


6. Commit your changes
<li>Add the directory of feature
<pre>git commit -a -m "My awesome feature has been added"</pre>
<pre>git add my_awesome_feature/</pre></li>


7. Push your changes
<li>Commit your changes
<pre>git commit -a -m "My awesome feature has been added"</pre></li>
 
<li>Push your changes
<pre>git push ssh://git.fedorahosted.org/git/fedora-insight-features.git/ devel</pre>
<pre>git push ssh://git.fedorahosted.org/git/fedora-insight-features.git/ devel</pre>
{{admon/note | Use ''devel'' branch for pushing | We use a different branch for the production status. Features under development are not pushed directly to that branch without being tested and approved by the team in some fashion.}}

Revision as of 21:10, 16 May 2011

Important.png
This is a draft.

What is Features?

We are using Features module. We can build custom features with this module because "no need to programming, just click-click and done". We can organize the each part of our Insight page into one or more feature like a custom module. So I would suggest that, create a few new features like "Super Event Calendar".

How to do this? What is a workflow?

That is a good question. We have to figure it out how to do this easily. I suggest that we put our features into a git repository like Insight repository, which contains our features, for example "Super Event Calendar", "Awesome Podcast System".

We have to complete this section, have to speak about this. --Asrob 18:01, 11 May 2011 (UTC)

How to use Features?

Need to review this! --Asrob 19:17, 11 May 2011 (UTC)

1. Download the Features module from http://drupal.org/project/features

2. Enable the module on http://example-domain/admin/build/modules page.

3. Manage the features on http://example-domain/admin/build/features page.

4. Create a custom feature on http://example-domain/admin/build/features/create page.

If you want to create a custom super feature, you have to click _create feature_ link at the top on the create feature page, see step 4.

Fill those requirements(Name, Description, Version) as you like it, then select those settings at the _Edit components_ part. If you have done with this, just click the _Download feature_ button.

After this process, just upload your custom feature on the server into the "sites/all/modules" directory.

When you created a custom feature and you would like to use it, then you have to go on Features page, see step 3.

If you want to enable a custom feature, you have to click a checkbox of the selected custom feature then click _save settings_ button.

Using GIT with Features

  1. Clone our Features repository
    git clone ssh://git.fedorahosted.org/git/fedora-insight-features.git
  2. Make a new branch for your work
    git checkout -b my-new-feature
  3. Change the directory
    cd fedora-insight-features
  4. Make a new directory
    mkdir my_awesome_feature
  5. Copy your feature files
    cp path/to/my/feature/* ./my_awesome_feature/
  6. Add the directory of feature
    git add my_awesome_feature/
  7. Commit your changes
    git commit -a -m "My awesome feature has been added"
  8. Push your changes
    git push ssh://git.fedorahosted.org/git/fedora-insight-features.git/ devel
    Note.png
    Use devel branch for pushing
    We use a different branch for the production status. Features under development are not pushed directly to that branch without being tested and approved by the team in some fashion.