-
-
Notifications
You must be signed in to change notification settings - Fork 346
Workflow
pjf edited this page Nov 16, 2014
·
8 revisions
The best way is to fork the project and clone it from your own github account:
leon@bofh-sider:~/git/ git clone [email protected]:techman83/CKAN.git
Then add CKAN as a remote upstream (using HTTPS to prevent accidental pushes):
master u=!CKAN> git remote add upstream https://github.com/KSP-CKAN/CKAN.git
To keep your master up to date is pretty straight forward:
master u=!CKAN> git fetch upstream
master u=!CKAN> git merge upstream/master
master u+13!CKAN> git push origin master
It's also really cool to create a branch for working on specific things and submitting those as pull requests.
master u=!CKAN> git checkout -b 999_fix_thing
Switched to a new branch '999_fix_thing'
999_fix_thing!CKAN *> git commit thing.pl -m "I'm fixing a thing - closes #999"
[999_fix_thing 1dacc06] I'm fixing a thing - closes #999
1 file changed, 1 insertion(+)
create mode 100644 thing.pl
999_fix_thing!CKAN> git push origin 999_fix_thing
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 305 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To [email protected]:techman83/CKAN.git
baad2a2..1dacc06 999_fix_thing -> 999_fix_thing
Simply use bin/build
from the top project directory:
$ bin/build
XBuild Engine Version 12.0
Mono, Version 3.2.8.0
Copyright (C) 2005-2013 Various Mono authors
Build started 16/11/2014 5:21:20 PM.
...
This will give you a netkan.exe
and ckan.exe
file in our current working directory.
Use NUnit
to test the compiled code. This is an important step to perform before pushing code to the main repository or submitting a pull request.
NUnit
is accessible via nunit-console
. In the same directory as CKAN.sln
, run
$ nunit-console ./build/Tests/bin/Debug/Tests.dll
NUnit-Console version 2.6.0.0
...
Tests run: 78, Errors: 0, Failures: 0, Inconclusive: 4, Time: 3.714873 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Contact us on the KSP forum or on our Discord server