Skip to content

Commit

Permalink
option to add gitignore at sqlproj creation (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzsquared authored Jan 16, 2024
1 parent 7d1b944 commit 65fe6c3
Show file tree
Hide file tree
Showing 4 changed files with 511 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<NoDefaultExcludes>true</NoDefaultExcludes>
<TemplateIntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)\$(MSBuildThisFileName)\sqlproject</TemplateIntermediateOutputPath>
<!-- NU5128 warns about dependencies, template package has no dependencies. -->
<NoWarn>$(NoWarn);NU5128</NoWarn>
Expand Down
11 changes: 8 additions & 3 deletions src/Microsoft.Build.Sql.Templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The templates are available on [NuGet](https://www.nuget.org/packages/Microsoft.Build.Sql.Templates/). To install the templates, run the following command:

```bash
dotnet new -i Microsoft.Build.Sql.Templates
dotnet new install Microsoft.Build.Sql.Templates
```

## Using the templates
Expand All @@ -30,6 +30,11 @@ Creating a new project "AdventureWorksLT" for Azure SQL Database (`-tp` or `--ta
dotnet new sqlproj -n "AdventureWorksLT" -tp "SqlAzureV12"
```

Creating a new project "AdventureWorks" with a `.gitignore` file (-g):

```bash
dotnet new sqlproj -n "AdventureWorks" -g
```

## Building the templates

Expand All @@ -39,12 +44,12 @@ The templates automatically generate a nupkg on build. To build and install the

```bash
dotnet build
dotnet new --install bin/Debug/Microsoft.Build.Sql.Templates.1.0.0.nupkg
dotnet new install bin/Debug/Microsoft.Build.Sql.Templates.1.0.0.nupkg
```


To uninstall the templates

```bash
dotnet new --uninstall Microsoft.Build.Sql.Templates
dotnet new uninstall Microsoft.Build.Sql.Templates
```
Loading

0 comments on commit 65fe6c3

Please sign in to comment.