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+ shell : pwsh
42+ run : |
43+ Write-Host "Unshallow Copilot branch..." -ForegroundColor Green
44+
45+ Write-Host "Removing the depth limit, prune unused refs, and grab tags" -ForegroundColor DarkGray
46+ git fetch --prune --unshallow --tags --no-recurse-submodules
47+
48+ Write-Host "Unshallow complete." -ForegroundColor Green
49+
3950 - name : Configure PowerShell Environment
4051 shell : pwsh
4152 run : |
@@ -71,16 +82,16 @@ jobs:
7182 # Install GitVersion for semantic versioning
7283 dotnet tool install --global GitVersion.Tool --version 5.*
7384
74- # # Verify installation
75- # dotnet-gitversion
85+ # Verify installation
86+ dotnet-gitversion
7687
7788 Write-Host ".NET tools installation complete." -ForegroundColor Green
7889
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
90+ - name : Verify GitVersion
91+ shell : pwsh
92+ run : |
93+ Write-Host "Running GitVersion to determine semantic version..." -ForegroundColor Green
94+ dotnet-gitversion | ConvertFrom-Json
8495
8596 - name : Resolve Dependencies
8697 shell : pwsh
@@ -97,11 +108,6 @@ jobs:
97108 run : |
98109 Write-Host "Building SqlServerDsc module..." -ForegroundColor Green
99110
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-
105111 # Build the module
106112 .\build.ps1 -Tasks 'build' -ErrorAction Stop
107113
0 commit comments