mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 09:35:38 -05:00
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
'use strict';
|
|
|
|
const gulp = require('gulp');
|
|
// {{SQL CARBON EDIT}}
|
|
const jeditor = require('gulp-json-editor');
|
|
|
|
gulp.task('mixin', function () {
|
|
// {{SQL CARBON EDIT}}
|
|
const updateUrl = process.env['SQLOPS_UPDATEURL'];
|
|
if (!updateUrl) {
|
|
console.log('Missing SQLOPS_UPDATEURL, skipping mixin');
|
|
return;
|
|
}
|
|
|
|
const quality = process.env['VSCODE_QUALITY'];
|
|
|
|
if (!quality) {
|
|
console.log('Missing VSCODE_QUALITY, skipping mixin');
|
|
return;
|
|
}
|
|
|
|
// {{SQL CARBON EDIT}}
|
|
let serviceUrl = 'https://raw.githubusercontent.com/Microsoft/sqlopsstudio/release/extensions/extensionsGallery.json';
|
|
if (quality === 'insider') {
|
|
serviceUrl = `https://raw.githubusercontent.com/Microsoft/sqlopsstudio/release/extensions/extensionsGallery-${quality}.json`;
|
|
}
|
|
let newValues = {
|
|
"updateUrl": updateUrl,
|
|
"quality": quality,
|
|
"extensionsGallery": {
|
|
"serviceUrl": serviceUrl
|
|
}
|
|
};
|
|
|
|
return gulp.src('./product.json')
|
|
.pipe(jeditor(newValues))
|
|
.pipe(gulp.dest('.'));
|
|
}); |