Powershell to dump database schema to text file
Use the dbatools module. 

From your svn you need to build your solution. With those dacpacs you can use the following command. 

Publish-DbaDacPackage -SqlInstance sql2017 -Database WideWorldImporters -Path C:\temp\sql2016-WideWorldImporters.dacpac -PublishXml C:\temp\sql2016-WideWorldImporters-publish.xml -GenerateDeploymentReport -ScriptOnly


Reference:
https://docs.dbatools.io/#Publish-DbaDacPackage