microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.6.6

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/extension/appcenter/codepush/release-strategy/appcenterCodePushRelease.ts

26lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import { AppCenterClient, models } from "../../api/index";
5import { ICodePushReleaseParams } from "../../command/commandParams";
6import { getQPromisifiedClientResult } from "../../api/createClient";
7import * as fs from "fs";
8
9export function appcenterCodePushRelease(client: AppCenterClient, params: ICodePushReleaseParams): Q.Promise<models.CodePushRelease> {
10 const app = params.app;
11 return getQPromisifiedClientResult(client.codepush.codePushDeploymentReleases.create(
12 app.appName,
13 params.deploymentName,
14 app.ownerName,
15 <string>params.appVersion,
16 {
17 packageProperty: fs.createReadStream(params.updatedContentZipPath),
18 deploymentName: params.deploymentName,
19 description: params.description,
20 disabled: params.isDisabled,
21 mandatory: params.isMandatory,
22 noDuplicateReleaseError: false, // TODO: remove it, not needed to send to server
23 rollout: params.rollout,
24 })
25 );
26}