microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/extension/appcenter/codepush/release-strategy/legacyCodePushRelease.ts
21lines · 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 | |
| 4 | import LegacyCodePushServiceClient from "./legacyCodePushServiceClient"; |
| 5 | import { models } from "../../api/index"; |
| 6 | import { ICodePushReleaseParams } from "../../command/commandParams"; |
| 7 | import { PackageInfo } from "./legacyCodePushServiceClient"; |
| 8 | import * as Q from "q"; |
| 9 | |
| 10 | export function legacyCodePushRelease(params: ICodePushReleaseParams, token: string, serverUrl: string): Q.Promise<models.CodePushRelease> { |
| 11 | const releaseData: PackageInfo = { |
| 12 | description: params.description, |
| 13 | isDisabled: params.isDisabled, |
| 14 | isMandatory: params.isMandatory, |
| 15 | rollout: params.rollout, |
| 16 | appVersion: params.appVersion, |
| 17 | }; |
| 18 | |
| 19 | return new LegacyCodePushServiceClient(token, params.app, serverUrl) |
| 20 | .release(params.deploymentName, params.updatedContentZipPath, releaseData); |
| 21 | } |