3636 with :
3737 fetch-depth : 0 # Full history needed for GitVersion
3838
39+ - name : Unshallow repository for GitVersion
40+ # if: startsWith(github.ref, 'refs/heads/copilot/')
41+ run : |
42+ Write-Host "Unshallow Copilot branch..." -ForegroundColor Green
43+
44+ Write-Host "Removing the depth limit, prune unused refs, and grab tags
45+ git fetch --prune --unshallow --tags --no-recurse-submodules
46+
47+ Write-Host "Unshallow complete." -ForegroundColor Green
48+
3949 - name : Configure PowerShell Environment
4050 shell : pwsh
4151 run : |
@@ -76,11 +86,11 @@ jobs:
7686
7787 Write-Host ".NET tools installation complete." -ForegroundColor Green
7888
79- # - name: Verify GitVersion
80- # shell: pwsh
81- # run: |
82- # Write-Host "Running GitVersion to determine semantic version..." -ForegroundColor Green
83- # dotnet-gitversion | ConvertFrom-Json
89+ - name : Verify GitVersion
90+ shell : pwsh
91+ run : |
92+ Write-Host "Running GitVersion to determine semantic version..." -ForegroundColor Green
93+ dotnet-gitversion | ConvertFrom-Json
8494
8595 - name : Resolve Dependencies
8696 shell : pwsh
@@ -97,11 +107,6 @@ jobs:
97107 run : |
98108 Write-Host "Building SqlServerDsc module..." -ForegroundColor Green
99109
100- # Hard-code versin due to how Coilot is switching branch (?) so gitversion fails.
101- $ModuleVersion = '0.0.1'
102- $env:ModuleVersion = '0.0.1'
103- [System.Environment]::SetEnvironmentVariable('ModuleVersion','0.0.1', 'Machine')
104-
105110 # Build the module
106111 .\build.ps1 -Tasks 'build' -ErrorAction Stop
107112
0 commit comments