pungi/doc/contributing/README

81 lines
3.1 KiB
Plaintext
Raw Normal View History

2015-05-29 19:45:01 +00:00
##############################################################################
# Developing
Currently the development workflow for pungi4 (devel-4-pungi) branch is:
- Make your own for at https://pagure.io/pungi
- Clone your fork locally (replacing $USERNAME with your own):
git clone git@pagure.io:forks/$USERNAME/pungi.git
- cd into your local clone and add the remote upstream for rebasing:
cd pungi
git remote add upstream git@pagure.io:pungi.git
#NOTE: This workflow assumes that you never 'git commit' directly to
# the devel-4-pungi branch of your fork. This will make more sense
# when we cover rebasing below.
- create a topic branch based on devel-4-pungi
git branch my_topic_branch devel-4-pungi
git checkout my_topic_branch
- Make edits, changes, add new features, etc. and then make sure to pull
from upstream and rebase before submitting a pull request.
## lets just say you edited setup.py for sake of argument
git checkout my_topic_branch
# make changes to setup.py
git add setup.py
git commit -m "added awesome feature to setup.py"
## Now we rebase
git checkout devel-4-pungi
git fetch upstream
git fetch upstream --tags
git merge upstream/devel-4-pungi
git push origin devel-4-pungi
git push origin --tags
git checkout my_topic_branch
git rebase devel-4-pungi
# Resolve merge conflicts if any as a result of your development in
# your topic branch
git push origin my_topic_branch
- Create pull request in the pagure.io web UI
- For convenience, here is a bash shell function that can be placed in your
~/.bashrc and called such as 'pullupstream pungi-4-devel' that will
automate a large portion of the rebase steps from above.
pullupstream () {
if [[ -z "$1" ]]; then
printf "Error: must specify a branch name (e.g. - master, devel)\n"
else
pullup_startbranch=$(git describe --contains --all HEAD)
git checkout $1
git fetch upstream
git fetch upstream --tags
git merge upstream/$1
git push origin $1
git push origin --tags
git checkout ${pullup_startbranch}
fi
}
##############################################################################
# Testing
Unit tests
- Unit tests are encouraged and should be placed in the tests/ directory
within the pungi git repository
Running pungi locally for testing
- Running pungi locally for testing, you should build the rpm, install it,
and run ''pungi-koji' as follows:
pungi-koji --target-dir=/path/to/store/compose/ --nightly \
--config=/path/to/pungi-fedora/fedora.conf
The fedora.conf file and other files it references can be found here:
https://pagure.io/pungi-fedora
- These can either be copied down locally or you can git clone that
repository as well to keep with the latest configurations.