Skip to content

Commit a13b032

Browse files
authored
Fix official VSIX version to unblock publishing to VS gallery (#1365)
1 parent 8cdbcfb commit a13b032

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.pipelines/Bicep.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
parameters:
2+
- name: official
3+
type: boolean
24
- name: rid
35
type: string
46

@@ -16,7 +18,7 @@ steps:
1618
inputs:
1719
command: build
1820
projects: $(BuildSolution)
19-
arguments: '--configuration $(BuildConfiguration)'
21+
arguments: '--configuration $(BuildConfiguration) /p:PublicRelease=${{ parameters.official }}'
2022

2123
- task: DotNetCoreCLI@2
2224
displayName: Test
@@ -40,7 +42,7 @@ steps:
4042
command: 'publish'
4143
publishWebProjects: false
4244
projects: ./src/Bicep.LangServer/Bicep.LangServer.csproj
43-
arguments: '--configuration $(BuildConfiguration)'
45+
arguments: '--configuration $(BuildConfiguration) /p:PublicRelease=${{ parameters.official }}'
4446
zipAfterPublish: false
4547

4648
- task: onebranch.pipeline.signing@1
@@ -64,7 +66,7 @@ steps:
6466
command: 'publish'
6567
publishWebProjects: false
6668
projects: ./src/Bicep.Cli/Bicep.Cli.csproj
67-
arguments: '--configuration $(BuildConfiguration) --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -r ${{ parameters.rid }}'
69+
arguments: '--configuration $(BuildConfiguration) --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -r ${{ parameters.rid }} /p:PublicRelease=${{ parameters.official }}'
6870
zipAfterPublish: false
6971

7072
- ${{ if eq(parameters.rid, 'win-x64') }}:
@@ -106,7 +108,7 @@ steps:
106108
inputs:
107109
command: build
108110
projects: ./src/installer-win/installer.proj
109-
arguments: '--configuration $(BuildConfiguration)'
111+
arguments: '--configuration $(BuildConfiguration) /p:PublicRelease=${{ parameters.official }}'
110112

111113
- task: onebranch.pipeline.signing@1
112114
displayName: Sign Windows Setup

.pipelines/Common.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ stages:
2020
steps:
2121
- template: Bicep.yml
2222
parameters:
23+
official: ${{ parameters.official }}
2324
rid: win-x64
2425

2526
- job: bicep_linux
@@ -37,6 +38,7 @@ stages:
3738
steps:
3839
- template: Bicep.yml
3940
parameters:
41+
official: ${{ parameters.official }}
4042
rid: linux-x64
4143

4244
- job: bicep_osx
@@ -54,6 +56,7 @@ stages:
5456
steps:
5557
- template: Bicep.yml
5658
parameters:
59+
official: ${{ parameters.official }}
5760
rid: osx-x64
5861

5962
- job: vsix
@@ -125,6 +128,9 @@ stages:
125128
displayName: Kill Xvfb
126129

127130
- script: npm run package
131+
env:
132+
# ensure that we generate a VS gallery compatible version number on official builds
133+
PublicRelease: ${{ parameters.official }}
128134
displayName: Create VSIX
129135
workingDirectory: $(Build.SourcesDirectory)/src/vscode-bicep
130136

version.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "0.2",
4-
"publicReleaseRefSpec": [
5-
"^refs/tags/v\\d+\\.\\d+\\.\\d+"
6-
]
3+
"version": "0.2"
74
}

0 commit comments

Comments
 (0)