mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add Apple Silicon build and Universal build for macOS (#20776)
* use stages * fix indention * add jobs section * fix error * indention * arm64 for macos * other stages not run * fix container * fix * fix stage * skip tests * variable * dependency * fix name error * sts * const * fall back to x64 * pass in variable * universal flavor * fix universal * fix path * remove * special processing * return on error * copy instead of move * restore sts * release * fix error * Fix readme * remove commented code * add comments * add issue * update comment * pr comments * delete universal yml * update the generated js file
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
(async () => {
|
||||
const serviceDownloader = require('@microsoft/ads-service-downloader').ServiceDownloadProvider;
|
||||
const platform = require('@microsoft/ads-service-downloader/out/platform').PlatformInformation;
|
||||
const platform = require('@microsoft/ads-service-downloader/out/platform');
|
||||
const path = require('path');
|
||||
const fs = require('fs').promises;
|
||||
const rimraf = require('rimraf');
|
||||
@@ -15,7 +15,15 @@
|
||||
async function installService() {
|
||||
const absoluteConfigPath = require.resolve('../config.json');
|
||||
const config = require(absoluteConfigPath);
|
||||
const runtime = (await platform.getCurrent()).runtimeId;
|
||||
let runtime = (await platform.PlatformInformation.getCurrent()).runtimeId;
|
||||
const arch = process.env['npm_config_arch'];
|
||||
|
||||
// In the build pipeline, macOS x64 image is used to produce arm64 build,
|
||||
// we need to check the environment variable to determine the actual target runtime.
|
||||
if (runtime === platform.Runtime.OSX && arch === 'arm64') {
|
||||
console.log(`Set the target runtime to OSX_ARM64`);
|
||||
runtime = platform.Runtime.OSX_ARM64;
|
||||
}
|
||||
// fix path since it won't be correct
|
||||
config.installDirectory = path.join(path.dirname(absoluteConfigPath), config.installDirectory);
|
||||
let installer = new serviceDownloader(config);
|
||||
|
||||
Reference in New Issue
Block a user