Skip to content

Commit

Permalink
Merge pull request #19 from Microsoft/text_updates
Browse files Browse the repository at this point in the history
Misc. updates
  • Loading branch information
lostintangent committed Mar 28, 2016
2 parents 3628833 + 23f908b commit 0e94a85
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 95 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@ The **CodePush - Release** task allows you to release an update to the CodePush

4. **Service Endpoint (HockeyApp)** - Allows you to reference a globally configured HockeyApp service endpoint.

2. **App Name** *(String, Required)* - The name of the app you want to release the update for.
2. **App Name** *(String, Required)* - Name of the app you want to release the update for.

3. **Update Contents Path** *(File path, Required)* - Path to the file or directory that contains the content(s) you want to release. For Cordova this should be the platform-specific `www` folder (e.g `platforms/ios/www`) and for React Native this should point to either your generated JS bundle file (e.g. `ios/main.jsbundle`) or a directory containing your JS bundle and assets, depending on if you're using the React Native assets system. View the [CLI docs](http://microsoft.github.io/code-push/docs/cli.html#update-contents-parameter) for more details.
3. **Deployment** *(String)* - Name of the deployment you want to release the update to. Defaults to `Staging`.

4. **Target Binary Version** *(String, Required)* - The binary version that this release is targeting. The value must be [semver](http://semver.org/) compliant. View the [CLI docs](http://microsoft.github.io/code-push/docs/cli.html#target-binary-version-parameter) for more details.
4. **Update Contents Path** *(File path, Required)* - Path to the file or directory that contains the update you want to release. For Cordova this should be the platform-specific `www` folder (e.g `platforms/ios/www`) and for React Native this should point to either your generated JS bundle file (e.g. `ios/main.jsbundle`) or a directory containing your JS bundle and assets, depending on if you're using the React Native assets system. View the [CLI docs](http://microsoft.github.io/code-push/docs/cli.html#update-contents-parameter) for more details.

5. **Deployment** *(String)* - Name of the deployment you want to release the update to. Defaults to `Staging`.
5. **Target Binary Version** *(String, Required)* - Semver expression that specifies the binary app version(s) this release is targetting (e.g. 1.1.0, ~1.2.3). View the [CLI docs](http://microsoft.github.io/code-push/docs/cli.html#target-binary-version-parameter) for more details.

6. **Description** *(String)* - Description of the update being released. When this task is used within a VSTS release definition, this field can be set to the `$(Release.ReleaseDescription)` variable in order to inherit the description that was given to the release.
#### Update Metadata

#### Advanced
In addition to the basic properties, the follow options provide more advanced control over the release and how it will be distributed to your end users:

In addition to the basic release properties, the follow options provide more advanced control over the update and how it will be distributed to your end users:
1. **Rollout** *(String)* - Percentage of users this release should be immediately available to. Defaults to `100%`.

1. **Rollout** *(String)* - Percentage of users you want this update to be available for, specified as a number between `1` and `100` (you can optionally specify a "%" suffix). Defaults to `null`, which is equivalent to `100`, and therefore, makes the release available to everyone.
6. **Description** *(String)* - Description of the changes made to the app in this release. When this task is used within a VSTS release definition, this field can be set to the `$(Release.ReleaseDescription)` variable in order to inherit the description that was given to the release.

2. **Mandatory** *(Boolean)* - Specifies whether the release should be considered mandatory or not. Defaults to `false`.
2. **Mandatory** *(Boolean)* - Specifies whether this release should be considered mandatory. Defaults to `false`.

3. **Disabled** *(Boolean)* - Specifies whether the release should be disabled, and therefore, not immediately downloadable by end-users. Defaults to `false`.
3. **Disabled** *(Boolean)* - Specifies whether this release should be immediately downloadable. Defaults to `false`.

### CodePush - Promote

Expand All @@ -104,23 +104,23 @@ The **CodePush - Promote** task allows you to promote a previously released upda

4. **Service Endpoint (HockeyApp)** - Allows you to reference a globally configured HockeyApp service endpoint.

2. **App Name** *(String, Required)* - The name of the app that has the deployments you are targeting for promotion.
2. **App Name** *(String, Required)* - Name of the app that has the deployments you are targeting for promotion.

3. **Source Deployment** *(String)* - Name of the deployment you want to promote the latest release from. Defaults to `Staging`.

4. **Destination Deployment** *(String)* - Name of the deployment you want to promote the release to. Defaults to `Production`.

#### Advanced
#### Update Metadata

By default, when a release is promoted from one deployment to another, the newly created release will "inherit" not just the update contents, but also the metadata (e.g. `description`). This ensures that what is being promoted is the exact same thing that you tested in the source deployment. However, if you need to override one or more properties in the newly created release within the target deployment (e.g. because you use `mandatory` differently between environments), you can use the following fields:

1. **Rollout** *(String)* - Percentage of users you want this update to be available for, specified as a number between `1` and `100` (you can optionally specify a "%" suffix). Note that the rollout property will not be inherited from the release being promoted. Defaults to `null`, which is equivalent to `100`, and therefore, makes the release available to everyone.
1. **Rollout** *(String)* - Percentage of users this release should be immediately available to. Defaults to `100%`

2. **Description** *(String)* - Description of the update being released. Leaving this field blank will result in the update inheriting the description from the release being promoted. When this task is used within a VSTS release definition, this field can be set to the `$(Release.ReleaseDescription)` variable in order to inherit the description that was given to the release.
2. **Description** *(String)* - Description of the changes made to the app in this release. Selecting `Inherit` will use the description from the release being promoted. When this task is used within a VSTS release definition, this field can be set to the `$(Release.ReleaseDescription)` variable in order to inherit the description that was given to the release. Defaults to `Inherit`.

3. **Mandatory** *(Boolean)* - Specifies whether the release should be considered mandatory. Selecting `Inherit` will use the value from the release being promoted. Defaults to `Inherit`.
3. **Mandatory** *(Boolean)* - Specifies whether this release should be considered mandatory. Selecting `Inherit` will use the mandatory attribute from the release being promoted. Defaults to `Inherit`.

4. **Disabled** *(Boolean)* - Specifies whether the release should be disabled, and therefore, not immediately downloadable by end-users. Selecting `Inherit` will use the value from the release being promoted. Defaults to `Inherit`.
4. **Disabled** *(Boolean)* - Specifies whether this release should be immediately downloadable. Selecting `Inherit` will use the disabled attribute from the release being promoted. Defaults to `Inherit`.

##Installation

Expand Down
2 changes: 1 addition & 1 deletion Tasks/codepush-promote/codepush-promote.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function buildCommand(cmd, positionArgs, optionFlags) {
var command = codePushCommandPrefix + " " + cmd;

positionArgs && positionArgs.forEach(function (positionArg) {
command = command + " " + positionArg;
command = command + " \"" + positionArg + "\"";
});

for (var flag in optionFlags) {
Expand Down
4 changes: 2 additions & 2 deletions Tasks/codepush-promote/codepush-promote.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ param (
[string]$appName,
[string]$sourceDeploymentName,
[string]$targetDeploymentName,
[string]$description,
[string]$rollout,
[string]$description,
[string]$isMandatory,
[string]$isDisabled
)
Expand All @@ -19,8 +19,8 @@ $env:INPUT_serviceEndpointHockeyApp = $serviceEndpointHockeyApp
$env:INPUT_appName = $appName
$env:INPUT_sourceDeploymentName = $sourceDeploymentName
$env:INPUT_targetDeploymentName = $targetDeploymentName
$env:INPUT_description = $description
$env:INPUT_rolloutput = $rollout
$env:INPUT_description = $description
$env:INPUT_isMandatory = $isMandatory
$env:INPUT_isDisabled = $isDisabled

Expand Down
32 changes: 16 additions & 16 deletions Tasks/codepush-promote/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "4e901d0e-189b-4403-a030-1d06ff8a3b28",
"name": "CodePushPromote",
"friendlyName": "CodePush - Promote",
"description": "Promote a CodePush release from one deployment to another",
"description": "Promote the latest CodePush release from one app deployment to another",
"author": "Microsoft Corporation",
"category": "Deploy",
"visibility": [
Expand All @@ -20,7 +20,7 @@
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"displayName": "Update Metadata",
"isExpanded": true
}
],
Expand All @@ -37,6 +37,15 @@
"ServiceEndpointHockeyApp": "Service Endpoint (HockeyApp)"
}
},
{
"name": "accessKey",
"type": "string",
"label": "Access Key",
"defaultValue": "",
"required": true,
"helpMarkDown": "Access key used to authenticate with the CodePush service.",
"visibleRule": "authType = AccessKey"
},
{
"name": "serviceEndpointCodePush",
"type": "connectedService:codepush-auth-key",
Expand All @@ -55,15 +64,6 @@
"helpMarkDown": "HockeyApp service endpoint that is configured with your account credentials.",
"visibleRule": "authType = ServiceEndpointHockeyApp"
},
{
"name": "accessKey",
"type": "string",
"label": "Access Key",
"defaultValue": "",
"required": true,
"helpMarkDown": "Access key used to authenticate with the CodePush service.",
"visibleRule": "authType = AccessKey"
},
{
"name": "appName",
"type": "string",
Expand Down Expand Up @@ -106,10 +106,10 @@
"name": "rollout",
"type": "string",
"label": "Rollout",
"defaultValue": "",
"defaultValue": "100%",
"required": false,
"groupName": "advanced",
"helpMarkDown": "Percentage of users you want this update to be available for, specified as a number between `1` and `100` (you can optionally specify a \"%\" suffix). Note that the rollout property will not be inherited from the release being promoted."
"helpMarkDown": "Percentage of users this release should be immediately available to. Note that the rollout property will not be inherited from the release being promoted."
},
{
"name": "description",
Expand All @@ -118,7 +118,7 @@
"defaultValue": "Inherit",
"required": true,
"groupName": "advanced",
"helpMarkDown": "Description of the update being released. Selecting \"Inherit\" will use the value from the release being promoted.<br />Note: This can be set to **$(Release.ReleaseDescription)** if being run within a release definition, and you want to inherit the release's description.",
"helpMarkDown": "Description of the changes made to the app in this release. Selecting \"Inherit\" will use the description from the release being promoted.<br />Note: This can be set to **$(Release.ReleaseDescription)** if being run within a release definition, and you want to inherit the release's description.",
"options": {
"Inherit": "Inherit"
},
Expand All @@ -133,7 +133,7 @@
"defaultValue": "Inherit",
"required": true,
"groupName": "advanced",
"helpMarkDown": "Specifies whether the release should be considered mandatory. Selecting \"Inherit\" will use the value from the release being promoted.",
"helpMarkDown": "Whether this release should be considered mandatory. Selecting \"Inherit\" will use the mandatory attribute from the release being promoted.",
"options": {
"Inherit": "Inherit",
"false": "No",
Expand All @@ -147,7 +147,7 @@
"defaultValue": "Inherit",
"required": true,
"groupName": "advanced",
"helpMarkDown": "Specifies whether the release should be disabled, and therefore, not immediately downloadable by end-users. Selecting \"Inherit\" will use the value from the release being promoted.",
"helpMarkDown": "Whether this release should be immediately downloadable. Selecting \"Inherit\" will use the disabled attribute from the release being promoted.",
"options": {
"Inherit": "Inherit",
"false": "No",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/codepush-promote/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe("CodePush Promote Task", function() {
var expectedCommands = [
"logout",
"login --accessKey \"" + ACCESS_KEY + "\"",
"promote " + APP_NAME + " " + SOURCE_DEPLOYMENT_NAME + " " + TARGET_DEPLOYMENT_NAME + " --mandatory \"false\" --rollout \"" + ROLLOUT + "\"",
"promote \"" + APP_NAME + "\" \"" + SOURCE_DEPLOYMENT_NAME + "\" \"" + TARGET_DEPLOYMENT_NAME + "\" --mandatory \"false\" --rollout \"" + ROLLOUT + "\"",
"logout"
];

Expand All @@ -96,7 +96,7 @@ describe("CodePush Promote Task", function() {
var expectedCommands = [
"logout",
"login --accessKey \"" + ACCESS_KEY + "\"",
"promote " + APP_NAME + " " + SOURCE_DEPLOYMENT_NAME + " " + TARGET_DEPLOYMENT_NAME + " --mandatory \"false\" --rollout \"" + ROLLOUT + "\"",
"promote \"" + APP_NAME + "\" \"" + SOURCE_DEPLOYMENT_NAME + "\" \"" + TARGET_DEPLOYMENT_NAME + "\" --mandatory \"false\" --rollout \"" + ROLLOUT + "\"",
"logout"
];

Expand Down
2 changes: 1 addition & 1 deletion Tasks/codepush-release/codepush-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function buildCommand(cmd, positionArgs, optionFlags) {
var command = codePushCommandPrefix + " " + cmd;

positionArgs && positionArgs.forEach(function(positionArg) {
command = command + " " + positionArg;
command = command + " \"" + positionArg + "\"";
});

for (var flag in optionFlags) {
Expand Down
8 changes: 4 additions & 4 deletions Tasks/codepush-release/codepush-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ param (
[string]$serviceEndpointCodePush,
[string]$serviceEndpointHockeyApp,
[string]$appName,
[string]$deploymentName,
[string]$packagePath,
[string]$appStoreVersion,
[string]$deploymentName,
[string]$description,
[string]$rollout,
[string]$description,
[string]$isMandatory,
[string]$isDisabled
)
Expand All @@ -18,11 +18,11 @@ $env:INPUT_accessKey = $accessKey
$env:INPUT_serviceEndpointCodePush = $serviceEndpointCodePush
$env:INPUT_serviceEndpointHockeyApp = $serviceEndpointHockeyApp
$env:INPUT_appName = $appName
$env:INPUT_deploymentName = $deploymentName
$env:INPUT_packagePath = $packagePath
$env:INPUT_appStoreVersion = $appStoreVersion
$env:INPUT_deploymentName = $deploymentName
$env:INPUT_description = $description
$env:INPUT_rolloutput = $rollout
$env:INPUT_description = $description
$env:INPUT_isMandatory = $isMandatory
$env:INPUT_isDisabled = $isDisabled

Expand Down
Loading

0 comments on commit 0e94a85

Please sign in to comment.