This commit is contained in:
Daeun Yim 2023-05-26 11:13:03 -07:00
Родитель 01468d80c4
Коммит b5acc33118
5 изменённых файлов: 55 добавлений и 30 удалений

Просмотреть файл

@ -1,26 +0,0 @@
trigger: none
pr: none
strategy:
matrix:
mac-x64:
platform: 'mac'
imageName: 'macOS-latest'
windows:
platform: 'windows'
imageName: 'windows-latest'
pool:
vmImage: $(imageName)
steps:
- template: templates/build.yml
- template: templates/code-sign.yml
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: '*.vsix'
targetFolder: '$(Build.ArtifactStagingDirectory)'
displayName: 'Copy Files'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: build
displayName: 'Publish Artifacts'

Просмотреть файл

@ -2,7 +2,7 @@ trigger: none
pr: none
strategy:
matrix:
mac-x64:
mac:
platform: 'mac'
imageName: 'macOS-latest'
windows:

Просмотреть файл

@ -9,7 +9,7 @@ steps:
yarn install
yarn run compile
yarn run package
yarn run package-offline
yarn run package-offline-windows
displayName: 'Installing Dependencies and build packages'
condition: eq(variables['platform'], 'windows')
@ -22,4 +22,4 @@ steps:
sudo npm install -g vsce
yarn install
yarn run compile
yarn run package
yarn run package-offline-osx

Просмотреть файл

@ -24,7 +24,9 @@
"scripts": {
"compile": "gulp build",
"package": "gulp package:online",
"package-offline": "gulp package:offline"
"package-offline": "gulp package:offline",
"package-offline-osx": "gulp package:offline-osx",
"package-offline-windows": "gulp package:offline-windows"
},
"contributes": {
"grammars": [

Просмотреть файл

@ -101,3 +101,52 @@ gulp.task('package:offline', () => {
return promise;
});
//Install vsce to be able to run this task: npm install -g vsce
gulp.task('package:offline-osx', () => {
var json = JSON.parse(fs.readFileSync('package.json'));
var name = json.name;
var version = json.version;
var packageName = name + '-' + version;
var packages = [];
packages.push({rid: 'osx', runtime: 'OSX'});
packages.push({rid: 'osx-arm64', runtime: 'OSX_ARM64'});
var promise = Promise.resolve();
cleanServiceInstallFolder().then(() => {
packages.forEach(data => {
promise = promise.then(() => {
return doOfflinePackage(data.rid, data.runtime, packageName).then(() => {
return cleanServiceInstallFolder();
});
});
});
});
return promise;
});
//Install vsce to be able to run this task: npm install -g vsce
gulp.task('package:offline-windows', () => {
var json = JSON.parse(fs.readFileSync('package.json'));
var name = json.name;
var version = json.version;
var packageName = name + '-' + version;
var packages = [];
packages.push({rid: 'win-x64', runtime: 'Windows_64'});
var promise = Promise.resolve();
cleanServiceInstallFolder().then(() => {
packages.forEach(data => {
promise = promise.then(() => {
return doOfflinePackage(data.rid, data.runtime, packageName).then(() => {
return cleanServiceInstallFolder();
});
});
});
});
return promise;
});