Most of us are not just starting working with NAV. But again not all of us have been able to apply Source Control Management (SCM) to our daily work.
In the previous posts we have installed and prepared our development environment and we are now ready to start working on our solution in the SCM way.
Our first step is to create a branch for our solution.
Now we should look at the options we have to import our solution into our branch. We can have our solution in different formats.
All these file formats can be imported into our solution branch with the tools that AdvaniaGIT delivers. Let’s start with the SQL backup, 2016-DAA_WineApp.bak. AdvaniaGIT will search for backups using these patterns.
$FilePatterns = @( "$($SetupParameters.navRelease)-$($SetupParameters.projectName).bak", "$($SetupParameters.navRelease)/$($SetupParameters.navVersion)/$($SetupParameters.projectName).bak", "$($SetupParameters.navRelease)/$($SetupParameters.projectName).bak", "$($SetupParameters.navRelease)-$($SetupParameters.navSolution).bak" "$($SetupParameters.navRelease)/$($SetupParameters.navVersion)/$($SetupParameters.navSolution).bak", "$($SetupParameters.navRelease)/$($SetupParameters.navSolution).bak")
In this example the values are:
$FilePatterns = @( "2016-WineSolution.bak", "2016/9.0.46045.0/WineSolution.bak", "2016/WineSolution.bak", "2016-NA.bak" "2016/9.0.46045.0/NA.bak", "2016/NA.bak")
The module first searches the local drive (default = C:\AdvaniaGIT\Backup) and then the ftp server if one is defined in GITSettings.json.
When AdvaniaGIT creates a database backup it is named according to the first pattern, in this case 2016-WineSolution.bak and saved in the default backup location.
The rest of the file types require that the solution branch has already been built like shown in the first video.
Here we restore from bacpac. Bacpac format is for example used by AzureSQL.
The Navdata format was created by the NAV development team. To be able to import from a Navdata file we require an Navdata export with the application included.
Perhaps the most common way is to have a FOB export.
Text exported objects can be imported directly into out GIT branch.
And finally we can update the solution branch from delta files.
Out next task will be to do some development in our solution and commit the changes we make to our GIT server. Stay tuned…