Skip to content

Latest commit

 

History

History
84 lines (57 loc) · 3.7 KB

CONTRIBUTING.md

File metadata and controls

84 lines (57 loc) · 3.7 KB

Developing XTF

Compile from source:

mvn clean install

XTF git development cycle

We use the git flow workflow. The steps are

  1. Read the guide.

  2. Create an account GitHub.

  3. Fork the XTF repository.

  4. Clone your fork, add the upstream XTF repository as a remote, and check out locally:

     git clone [email protected]:USERNAME/xtf.git
     cd xtf
     git remote add upstream [email protected]:xtf-cz/xtf.git
     git branch master
     git checkout master
     git pull --rebase upstream master
    

    The steps until here only need to be executed once, with the exception being the last command: rebasing against upstream master branch. You need to rebase every time the upstream master is updated.

  5. Create a feature branch

     git branch feature/BRANCH_NAME
    
  6. Make the changes to the code (usually fixing a bug or adding a feature)

  7. Ensure the code compiles without any error, tests pass and complies with the code style.

     mvn clean test
    

    If jou need a code style check:

     mvn process-sources
    

    If something does not work, try to find out whether your change caused it, and why. Read error messages and use the internet to find solutions. Compilation errors are the easiest to fix! If all that does not help, ask us.

  8. Commit with informative commit messages:

     git commit FILENAME(S) -m "Fix issue #1234"
     git commit FILENAME(S) -m "Add feature XYZ"
    

    The amend option is your friend if you are updating single commits (so that they appear as one)

     git commit --amend FILENAME(S)
    

    If you want to group say the last three commits as one, squash them, for example

     git reset --soft HEAD~3
     git commit -m 'Clear commit message'
    
  9. Rebase against XTF's master branch. This might cause rebase errors, which you need to solve

     git pull --rebase upstream master
    
  10. Push your commits to your fork

     git push origin feature/BRANCH_NAME
    

    If you squashed or amended commits after you had pushed already, you might be required to force push via using the git push -f option with care.

  11. Send a pull request (PR) via GitHub. As described above, you can always update a pull request using the git push -f option. Please do not close and send new ones instead, always update.

Requirements for merging your PR

  • Read some tips on how to write good pull requests. Make sure you don't waste your (and our) time by not respecting these basic rules.
  • All tests pass
  • The PR is small in terms of line changes.
  • The PR is clean and addresses one issue.
  • The number of commits is minimal (i.e. one), the message is neat and clear.
  • For docs: clear, correct English language, spell-checked

Automatic deploy to Maven repository

XTF is automatically built and deployed to maven repository when a feature branch is pushed into the upstream XTF repository. See distributionManagement pom.xml

In case you want to deploy into Maven repository anytime you push branch into your fork. You will need to configure github secrets for maven repositories in your fork. Contact XTF admins for the details.