altersqlproj.sh 1.4 KB

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. sed -i -e "/<Import Condition/ s/'\$(SQLDBExtensionsRefPath)'/'\$(NetCoreBuild)' != 'true' AND '\$(SQLDBExtensionsRefPath)'/" \
  3. -e "\|^</Project>|i \
  4. <Import Condition=\"'\$(NetCoreBuild)' == 'true'\" Project=\"\$(NETCoreTargetsPath)\\\\Microsoft.Data.Tools.Schema.SqlTasks.targets\"\/>\n \
  5. <ItemGroup>\n \
  6. <PackageReference Condition=\"'\$(NetCoreBuild)' == 'true'\" Include=\"Microsoft.NETFramework.ReferenceAssemblies\" Version=\"1.0.0\" PrivateAssets=\"All\"/>\n \
  7. </ItemGroup>\n \
  8. <Target Name=\"BeforeBuild\">\n \
  9. <Delete Files=\"\$(BaseIntermediateOutputPath)\\\\project.assets.json\"/>\n \
  10. </Target>" \
  11. -e "/BNK_Banking_GetAccountDetails.sql/d" \
  12. -e "/BNK_Banking_Modulr_GetInstitutionKeyAndSecret.sql/d" \
  13. -e "/GetModulrAccountId.sql/d" \
  14. -e "s/\"Banking.sql/\"banking.sql/" \
  15. -e "s/DestroyCardsUnder/DESTROYCARDSUNDER/" \
  16. -e "s/DpsOnlineFees/Dpsonlinefees/" \
  17. -e "s/Export_to_CSV_Audit/Export_to_CSV_audit/" \
  18. -e "s/XML_Reported_Presentments.sql/XML_reported_presentments.sql/" \
  19. -e "s/UpdateEhiCutOffurls_Pm.sql/UPDATEEHICUTOFFURLS_PM.sql/" \
  20. -e '/<ArtifactReference.*master.dacpac.*/, /<\/ArtifactReference/ d' \
  21. -e 's/Sql130DatabaseSchemaProvider/Sql150DatabaseSchemaProvider/' \
  22. *.sqlproj
  23. if [ -f Scripts/Post-Deployment/Script.PostDeployment.sql ]; then
  24. sed -i -e 's/:r .\\/:r /' Scripts/Post-Deployment/Script.PostDeployment.sql
  25. fi