To download the OpenADK code, simply click on the 'ZIP' button and uncompress to a directory. Once done, load the appropriate Solution under the src
directory in Visual Studio.
The code base should include the latest data models for each locale.
Ant must be installed on build computer.
- Download both OpenADK .NET and OpenADK Java as sibling projects from GitHub.
- From the command line, browse to the open-adk-java/adk-generator folder.
- Run 'ant dotnet.deploy'
This will build the .NET SDO libraries and add them to the correct directories in the open-adk-csharp project. Once this is run, open your IDE.
In the case of Visual Studio, the .sln files have already been created so you can open the solution of your choice. They are located in the 'src' directory.
In Visual Studio, use the solution explorer to add the newly generated SDO directory.
Select the project, i.e. OpenADK-UK-SDO. Then at the top of the solution explorer select the 'show all files' button. The generated folders should appear. Right click on the new folders and select 'Include In Project'.
The solution should now be ready to go.
For some background information regarding the branching model used by this project, refer to the article A successful Git branching model. The ideas from that article have been combined with the collaborative development techniques recommended by GitHub (specifically Using Pull Requests) to form these procedures.
- Git installed.
- A strong understanding of Git. For an introduction, read Getting Started - Git Basics.
- A GitHub account and Pull access to the OpenADK repositories.
The procedures following refer to 3 Git repositories:
- The remote OpenADK-csharp repository containing a central copy of the code.
- Your remote repository created within your GitHub account.
- Your local repository residing on your local machine.
-
Fork the OpenADK-csharp repository into your remote repository (click on the "Fork" button).
-
Clone your fork to create your local repository. This will create a OpenADK-csharp directory on your local machine.
c:\dev> git clone https://github.com/USERNAME/OpenADK-csharp.git
-
Add the upstream (OpenADK-csharp) repository as a remote. This will allow you to keep track of the OpenADK-csharp repository and pull in updates.
c:\dev> cd OpenADK-csharp c:\dev\OpenADK-csharp> git remote add upstream git://github.com/open-adk/OpenADK-csharp.git
-
Create a topic branch in your remote repository based upon the develop branch and switch to it (your local repository). Do not base your topic branch on any other branch!
c:\dev\OpenADK-csharp> git checkout -t origin/develop c:\dev\OpenADK-csharp> git branch ISSUE_XXX develop c:\dev\OpenADK-csharp> git checkout ISSUE_XXX
-
Ensure that all changes applied to the topic branch (locally) have been committed to your remote repository (with an appropriate message). The -a flag skips staging.
c:\dev\OpenADK-csharp> git commit -a -m MESSAGE
-
Before submission, ensure that your remote repository is up-to-date.
c:\dev\OpenADK-csharp> git checkout develop c:\dev\OpenADK-csharp> git fetch upstream c:\dev\OpenADK-csharp> git merge upstream/develop
-
Rebase the changes in your local repository (making for a cleaner history).
c:\dev\OpenADK-csharp> git checkout ISSUE_XXX c:\dev\OpenADK-csharp> git rebase develop
-
Resolve and recommit merge conflicts (if any), and continue the rebase.
c:\dev\OpenADK-csharp> git rebase --continue
-
Push your local changes to your remote repository.
c:\dev\OpenADK-csharp> git push origin ISSUE_XXX
The Using Pull Requests article provides a comprehensive guide for issuing a Pull Request.
-
Browse to your remote (forked) repository on the GitHub site.
-
Switch to the ISSUE_XXX branch and press the "Pull Request" button.
-
Review the Pull Request details and provide a meaningful title (with issue number if appropriate) and description of your change. It is important to ensure that the base branch is set to develop and the head branch is set to ISSUE_XXX.
-
Press the "Send pull request" button.
Pull Requests are automatically closed when the requested commits are merged into the OpenADK-csharp repository. However, a number of other tasks may be helpful once your changes have been accepted and processed.
-
Remove the ISSUE_XXX branch both from your local repository and your remote repository.
c:\dev\OpenADK-csharp> git branch -d *ISSUE_XXX* c:\dev\OpenADK-csharp> git push origin --delete *ISSUE_XXX*
-
Update the develop branch of your remote repository with the latest version of the OpenADK-csharp repository.
c:\dev\OpenADK-csharp> git checkout develop c:\dev\OpenADK-csharp> git fetch upstream c:\dev\OpenADK-csharp> git merge upstream/develop c:\dev\OpenADK-csharp> git push origin develop
GitHub provides the ability for a Pull Request to be automatically merged. If you have the appropriate permissions, the "Merge pull request" button can be used from the "Pull Requests" page. Alternatively, you could perform a manual merge on the command line.
-
Check out a new branch of the OpenADK-csharp repository to test the changes in.
c:\dev\OpenADK-csharp> git checkout -b USERNAME-ISSUE_XXX develop
-
Bring in the changes from the requesting repository into your new branch and perform your tests.
c:\dev\OpenADK-csharp> git pull https://github.com/USERNAME/OpenADK-csharp.git ISSUE_XXX
-
Merge the changes and update the OpenADK-csharp repository.
c:\dev\OpenADK-csharp> git checkout develop c:\dev\OpenADK-csharp> git merge USERNAME-ISSUE_XXX c:\dev\OpenADK-csharp> git push origin develop
-
Merge from release to master.
-
Tag (annotated) the master branch with an appropriate release number and share it with the OpenADK-csharp repository.
c:\dev\OpenADK-csharp> git checkout master c:\dev\OpenADK-csharp> git tag -a X.X.X -m MESSAGE c:\dev\OpenADK-csharp> git push origin X.X.X
The following steps need to be performed within your remote repository. Care should be taken as these steps operate directory on the master branch.
-
Create a new topic branch within your remote repository for the hotfix.
c:\dev\OpenADK-csharp> git checkout -b HOTFIX_XXX master
-
Apply your changes to the HOTFIX_XXX branch.
-
Commit your changes.
c:\dev\OpenADK-csharp> git commit -a -m MESSAGE
-
Push your local changes to your remote repository.
c:\dev\OpenADK-csharp> git push origin HOTFIX_XXX
-
Browse to your remote (forked) repository on the GitHub site.
-
Switch to the HOTFIX_XXX branch and press the "Pull Request" button.
-
Review the Pull Request details and provide a meaningful title (with issue number if appropriate) and description of your change. It is important to ensure that the base branch is set to master and the head branch is set to HOTFIX_XXX.
-
Press the "Send pull request" button.
The following steps need to be performed within the OpenADK-csharp repository.
-
Browse to the OpenADK-csharp repository on the GitHub site.
-
Find the Pull Request and merge it (using the "Merge pull request" button).
-
Before updating the (tag) version number, ensure that locally the code is up-to-date. Tag (annotated) the master branch with an appropriate release number and share it with the OpenADK-csharp repository. With a hotfix submission, increment the third digit of the version number by 1.
c:\dev\OpenADK-csharp> git checkout master c:\dev\OpenADK-csharp> git tag -a X.X.X -m MESSAGE c:\dev\OpenADK-csharp> git push origin X.X.X
-
Merge the changes into the develop branch.
c:\dev\OpenADK-csharp> git checkout develop c:\dev\OpenADK-csharp> git fetch origin c:\dev\OpenADK-csharp> git merge origin/master c:\dev\OpenADK-csharp> git push origin develop