@@ -6,42 +6,36 @@ parameters:
6
6
- name : VSCODE_CLI_ENV
7
7
type : object
8
8
default : {}
9
+ - name : VSCODE_CHECK_ONLY
10
+ type : boolean
9
11
10
12
steps :
11
- - script : cargo build --release --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code
12
- displayName : Compile ${{ parameters.VSCODE_CLI_TARGET }}
13
- workingDirectory : $(Build.SourcesDirectory)/cli
14
- env :
15
- CARGO_NET_GIT_FETCH_WITH_CLI : true
16
- ${{ each pair in parameters.VSCODE_CLI_ENV }} :
17
- ${{ pair.key }} : ${{ pair.value }}
18
-
19
- - ${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }} :
20
- - powershell : |
21
- . build/azure-pipelines/win32/exec.ps1
22
- $ErrorActionPreference = "Stop"
23
- Move-Item -Path $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe -Destination "$(Build.ArtifactStagingDirectory)/${env:VSCODE_CLI_APPLICATION_NAME}.exe"
24
-
25
- - task : ArchiveFiles@2
26
- inputs :
27
- rootFolderOrFile : $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME).exe
28
- includeRootFolder : false
29
- archiveType : zip
30
- archiveFile : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
31
-
32
- - publish : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
33
- artifact : ${{ parameters.VSCODE_CLI_ARTIFACT }}
34
- displayName : Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
35
-
13
+ - ${{ if parameters.VSCODE_CHECK_ONLY }} :
14
+ - script : cargo clippy --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code
15
+ displayName : Lint ${{ parameters.VSCODE_CLI_TARGET }}
16
+ workingDirectory : $(Build.SourcesDirectory)/cli
17
+ env :
18
+ CARGO_NET_GIT_FETCH_WITH_CLI : true
19
+ ${{ each pair in parameters.VSCODE_CLI_ENV }} :
20
+ ${{ pair.key }} : ${{ pair.value }}
36
21
- ${{ else }} :
37
- - script : |
38
- set -e
39
- mv $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
22
+ - script : cargo build --release --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code
23
+ displayName : Compile ${{ parameters.VSCODE_CLI_TARGET }}
24
+ workingDirectory : $(Build.SourcesDirectory)/cli
25
+ env :
26
+ CARGO_NET_GIT_FETCH_WITH_CLI : true
27
+ ${{ each pair in parameters.VSCODE_CLI_ENV }} :
28
+ ${{ pair.key }} : ${{ pair.value }}
29
+
30
+ - ${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }} :
31
+ - powershell : |
32
+ . build/azure-pipelines/win32/exec.ps1
33
+ $ErrorActionPreference = "Stop"
34
+ Move-Item -Path $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe -Destination "$(Build.ArtifactStagingDirectory)/${env:VSCODE_CLI_APPLICATION_NAME}.exe"
40
35
41
- - ${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }} :
42
36
- task : ArchiveFiles@2
43
37
inputs :
44
- rootFolderOrFile : $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
38
+ rootFolderOrFile : $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME).exe
45
39
includeRootFolder : false
46
40
archiveType : zip
47
41
archiveFile : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
@@ -51,14 +45,31 @@ steps:
51
45
displayName : Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
52
46
53
47
- ${{ else }} :
54
- - task : ArchiveFiles@2
55
- inputs :
56
- rootFolderOrFile : $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
57
- includeRootFolder : false
58
- archiveType : tar
59
- tarCompression : gz
60
- archiveFile : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
48
+ - script : |
49
+ set -e
50
+ mv $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
61
51
62
- - publish : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
63
- artifact : ${{ parameters.VSCODE_CLI_ARTIFACT }}
64
- displayName : Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
52
+ - ${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }} :
53
+ - task : ArchiveFiles@2
54
+ inputs :
55
+ rootFolderOrFile : $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
56
+ includeRootFolder : false
57
+ archiveType : zip
58
+ archiveFile : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
59
+
60
+ - publish : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
61
+ artifact : ${{ parameters.VSCODE_CLI_ARTIFACT }}
62
+ displayName : Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
63
+
64
+ - ${{ else }} :
65
+ - task : ArchiveFiles@2
66
+ inputs :
67
+ rootFolderOrFile : $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
68
+ includeRootFolder : false
69
+ archiveType : tar
70
+ tarCompression : gz
71
+ archiveFile : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
72
+
73
+ - publish : $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
74
+ artifact : ${{ parameters.VSCODE_CLI_ARTIFACT }}
75
+ displayName : Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
0 commit comments