After the EF Oracle Identity Patch, we publish the Apply Company Policy (ACP) project as SDK on GitHub. Based on that repository, you can customize an ACP package to suit your needs. This way you can still profit from any new updates we publish in the ACP SDK and easily include the changes from the original ACP SDK in your customized package.In the first step you have to create and initialize your own repository where you customize the ACP package.
Therefore create a team project (configured with Git as version control system) on your TFS. In Visual Studio, connect to your just created project:
Then clone the repository to your local machine:
Your branch overview should look like this:
Note that your repository is completely empty and the master branch is not published yet. In order to finish initialization, you have to add at least one file, commit and push the changes to the TFS by publishing the branch. The easiest way to do this is to open the command prompt in your local repository.
Then create the file “README.md” using the “touch” command. This file already exists in the ACP SDK repository on GitHub and will just be updated when you pull the current version.
The file should appear now in Visual Studio in the “Changes” tab under “Untracked Files”. Hit “Add All” to add the file to the repository.
Enter a commit message and commit your changes.
Now you can publish the master branch.
After this operation, your local and the remote repository are in sync.
The second step is to get the current version of the ACP SDK. Therefore, open again the command prompt in your local repository. Enter the following command:
git remote add ACPOrigin https://github.com/AITGmbH/AIT-Apply-Company-Policy-SDK.git
This operation adds another remote to your local repository with the name “ACPOrigin” that points to the ACP SDK repository on GitHub. The default remote is always called “origin” and you have already initialized this default remote by initializing the repository (remember: clone, commit changes, publish branch). You can see all your remotes using the command:
git remote
Using the “pull” command, you can pull files from a remote repository. If you don’t specify a remote name, you always pull from the default remote “origin”. But with the following command, you can pull from the master branch of the just created remote “ACPOrigin”:
git pull ACPOrigin master --no-tags
Note the option “–no-tags”. If you don’t include this option, the tags are fetched from the remote as well. However, if you want to apply tags to commits indicating a new version of your customized package, it might be better to ignore the tags from the ACP SDK.
This pull operation automatically merges the files and immediately commits the changes with a generated message. In the “Unsynced Commits” tab, you can see that the latest commit refers to the pull operation, all other commits are fetched from the ACP SDK repository.
Synchronize the commits. Then click on the Home icon in the Team Explorer and open the solution.
Now you are ready to customize your ACP package and push it to your TFS.
Whenever there is a new version of the ACP SDK, run the pull from ACPOrigin command again:
git pull ACPOrigin master --no-tags
Any conflicts can be resolved in Visual Studio. Then you can push again to your TFS and release a new version of your ACP package.
Once the first initialization steps are done, this is an easy method to profit from new ACP SDK Releases and still keep your customizations.