@vscode/gulp-electron 1.34.0 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/azure-pipelines.yml +2 -0
- package/package.json +1 -1
- package/src/download.js +5 -3
package/azure-pipelines.yml
CHANGED
package/package.json
CHANGED
package/src/download.js
CHANGED
|
@@ -11,17 +11,18 @@ const { Octokit } = require("@octokit/rest");
|
|
|
11
11
|
const got = require("got");
|
|
12
12
|
|
|
13
13
|
async function getDownloadUrl(
|
|
14
|
-
ownerRepo,
|
|
14
|
+
ownerRepo, customTag,
|
|
15
15
|
{ version, platform, arch, token, artifactName, artifactSuffix }
|
|
16
16
|
) {
|
|
17
17
|
const [owner, repo] = ownerRepo.split("/");
|
|
18
18
|
const octokit = new Octokit({ auth: token });
|
|
19
19
|
const releaseVersion = version.startsWith("v") ? version : `v${version}`;
|
|
20
|
+
const tag = customTag ?? releaseVersion;
|
|
20
21
|
|
|
21
22
|
const { data: release } = await octokit.repos.getReleaseByTag({
|
|
22
23
|
owner,
|
|
23
24
|
repo,
|
|
24
|
-
tag
|
|
25
|
+
tag,
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
if (!release) {
|
|
@@ -117,7 +118,7 @@ async function download(opts) {
|
|
|
117
118
|
);
|
|
118
119
|
|
|
119
120
|
if (opts.repo) {
|
|
120
|
-
const url = await getDownloadUrl(opts.repo, downloadOpts);
|
|
121
|
+
const url = await getDownloadUrl(opts.repo, opts.tag, downloadOpts);
|
|
121
122
|
|
|
122
123
|
downloadOpts = {
|
|
123
124
|
...downloadOpts,
|
|
@@ -166,6 +167,7 @@ function getDarwinLibFFMpegPath(opts) {
|
|
|
166
167
|
module.exports = function (opts) {
|
|
167
168
|
const downloadOpts = {
|
|
168
169
|
version: opts.version,
|
|
170
|
+
tag: opts.tag,
|
|
169
171
|
platform: opts.platform,
|
|
170
172
|
arch: opts.arch === "arm" ? "armv7l" : opts.arch,
|
|
171
173
|
artifactName: "electron",
|