Skip to content

Commit

Permalink
Add linked .dacpac files to dacpac list (#2744)
Browse files Browse the repository at this point in the history
* Add linked .dacpac files to dacpac list

* null check

* make build faster?
  • Loading branch information
ErikEJ authored Dec 18, 2024
1 parent 5cb84a5 commit 447008c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/cli-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ jobs:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.100'

- name: Build CLI 8
run: dotnet build src\Core\efcpt.8\efcpt.8.csproj

- name: Build CLI 9
run: dotnet build src\Core\efcpt.9\efcpt.9.csproj

- name: Package CLI 8
run: dotnet pack src\Core\efcpt.8\efcpt.8.csproj -p:PackageVersion=8.1.${{ env.VERSION }}-nightly -p:InformationalVersion=8.1.${{ env.VERSION }}-nightly
if: startsWith(github.ref, 'refs/heads/master')
run: dotnet pack src\Core\efcpt.8\efcpt.8.csproj --no-build -p:PackageVersion=8.1.${{ env.VERSION }}-nightly -p:InformationalVersion=8.1.${{ env.VERSION }}-nightly

- name: Package CLI 9
run: dotnet pack src\Core\efcpt.9\efcpt.9.csproj -p:PackageVersion=9.1.${{ env.VERSION }}-nightly -p:InformationalVersion=9.1.${{ env.VERSION }}-nightly
if: startsWith(github.ref, 'refs/heads/master')
run: dotnet pack src\Core\efcpt.9\efcpt.9.csproj --no-build -p:PackageVersion=9.1.${{ env.VERSION }}-nightly -p:InformationalVersion=9.1.${{ env.VERSION }}-nightly

- name: Core test project
run: dotnet test src\Core\NUnitTestCore\NUnitTestCore.csproj
Expand Down
7 changes: 4 additions & 3 deletions src/GUI/Shared/Helpers/SqlProjHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,14 @@ private static async System.Threading.Tasks.Task LinkedFilesSearchAsync(IEnumera
if (item.Type == SolutionItemType.PhysicalFile)
{
var file = item as PhysicalFile;
var fullPath = file.FullPath;
var fullPath = file.Parent?.FullPath;

if (file.Extension == ".dacpac"
&& !string.IsNullOrEmpty(fullPath)
&& !fullPath.StartsWith(Path.GetDirectoryName(item.FullPath), StringComparison.OrdinalIgnoreCase))
&& !string.IsNullOrEmpty(file.FullPath)
&& !fullPath.StartsWith(Path.GetDirectoryName(file.FullPath), StringComparison.OrdinalIgnoreCase))
{
files.Add(fullPath);
files.Add(file.FullPath);
}
}
}
Expand Down

0 comments on commit 447008c

Please sign in to comment.