Compile from source:
mvn clean install
We use the git flow workflow. The steps are
-
Read the guide.
-
Create an account GitHub.
-
Fork the XTF repository.
-
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.
-
Create a feature branch
git branch feature/BRANCH_NAME
-
Make the changes to the code (usually fixing a bug or adding a feature)
-
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.
-
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'
-
Rebase against XTF's master branch. This might cause rebase errors, which you need to solve
git pull --rebase upstream master
-
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. -
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.
- 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
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.