Skip to content

Commit

Permalink
use extension id as key not folder name which is more accurate (#153178)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt authored Jun 24, 2022
1 parent ba9b33b commit 551cf46
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion build/azure-pipelines/upload-nlsmetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const vfs = require("vinyl-fs");
const merge = require("gulp-merge-json");
const gzip = require("gulp-gzip");
const identity_1 = require("@azure/identity");
const path = require("path");
const fs_1 = require("fs");
const azure = require('gulp-azure-storage');
const commit = process.env['VSCODE_DISTRO_COMMIT'] || process.env['BUILD_SOURCEVERSION'];
const credential = new identity_1.ClientSecretCredential(process.env['AZURE_TENANT_ID'], process.env['AZURE_CLIENT_ID'], process.env['AZURE_CLIENT_SECRET']);
Expand Down Expand Up @@ -62,7 +64,11 @@ function main() {
break;
}
}
const key = 'vscode.' + file.relative.split('/')[0];
// Get extension id and use that as the key
const folderPath = path.join(file.base, file.relative.split('/')[0]);
const manifest = (0, fs_1.readFileSync)(path.join(folderPath, 'package.json'), 'utf-8');
const manifestJson = JSON.parse(manifest);
const key = manifestJson.publisher + '.' + manifestJson.name;
return { [key]: parsedJson };
},
}))
Expand Down
9 changes: 8 additions & 1 deletion build/azure-pipelines/upload-nlsmetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import * as vfs from 'vinyl-fs';
import * as merge from 'gulp-merge-json';
import * as gzip from 'gulp-gzip';
import { ClientSecretCredential } from '@azure/identity';
import path = require('path');
import { readFileSync } from 'fs';
const azure = require('gulp-azure-storage');

const commit = process.env['VSCODE_DISTRO_COMMIT'] || process.env['BUILD_SOURCEVERSION'];
Expand Down Expand Up @@ -79,7 +81,12 @@ function main(): Promise<void> {
break;
}
}
const key = 'vscode.' + file.relative.split('/')[0];

// Get extension id and use that as the key
const folderPath = path.join(file.base, file.relative.split('/')[0]);
const manifest = readFileSync(path.join(folderPath, 'package.json'), 'utf-8');
const manifestJson = JSON.parse(manifest);
const key = manifestJson.publisher + '.' + manifestJson.name;
return { [key]: parsedJson };
},
}))
Expand Down

0 comments on commit 551cf46

Please sign in to comment.