Some of our repositories reference third-party code. In many cases,
this can be managed using NuGet, but sometimes
we need to make private modifications and build from source.
We accomplish this by creating a repository for the third-party code. In some cases, this repository is added as a submodule under ext in the repositories that need it; in other cases, the binaries created from the code are committed to another repository’s lib folder. The decision depends on how complicated it is to build the code versus how useful it is for developers to have the source (and not just precompiled binaries).
In the third-party repository, the upstream branch contains the unmodified upstream code, while the master branch contains the Logos-specific modifications.
When cloning the repository locally, the origin remote refers to our repository containing the third-party code. If the original third-party code is available via git, then we add an upstream remote that references the original maintainer’s code.
Example: Creating a ThirdParty repo from source on GitHub
Example: Creating a ThirdParty repo from source in Subversion
Once the repository is created, we will want to update it with new versions of the third-party code when they are released (then merge in our changes).
The new code gets committed to the upstream branch, then that gets merged into master. If necessary, conflicts are resolved, or our changes are edited/removed to reflect changes in the upstream code.
Example: Updating a ThirdParty repository from source on GitHub
Example: Updating a ThirdParty repository from source in Subversion