Skip to content

Commit

Permalink
Issue #4 - Clarify manual submission doc in Usage.md
Browse files Browse the repository at this point in the history
Removed quotation marks from examples for consistency

More fun with quotes

Addressed feedback from @HowardWolosky-MSFT:
- exported DeepCopy-Object (as an alias)
- Fixed 1 unrelated typo

Addressed feedback from @HowardWolosky-MSFT:
- removed code analysis suppression that's made redudant, now that DeepCopy-Object is aliased to an approved verb
- fixed indentation of bulletted code snippets

version bump to 1.0.1

Update USAGE.md

Trying out indentation changes again for bulleted code snippets, using Github's editor
  • Loading branch information
Lisa Ong authored and HowardWolosky committed Dec 7, 2016
1 parent fb62384 commit 96d5ec4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
21 changes: 15 additions & 6 deletions Documentation/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,28 +260,37 @@ manually.

* Clone the existing published submission so that you can generate an update.

$sub = New-ApplicationSubmission -IapId <iapId> [-Force]
$sub = New-ApplicationSubmission -AppId <appId> [-Force]

* By using the `-Force` switch, it will call `Remove-ApplicationSubmission` behind the
scenes if it finds that there's an existing pending submission for your app.

* Read in the content of the json file from your `New-SubmissionPackage` payload:

$json = (Get-Content .\submission.json -Encoding UTF8) | ConvertFrom-Json
$json = (Get-Content .\submission.json -Encoding UTF8) | ConvertFrom-Json

* At this point we'd "patch in" the changes requested based on the switches provided into `$sub`.
* If you need to update any content for the cloned submission, here is where you'd "patch in"
applicable values from `$json` into `$sub`.

* For example, here's how you can change a simple content that has a single value:

$sub.hardwarePreferences = $json.hardwarePreferences

* For nested content, you will need to use `DeepCopy-Object` so that all nested values are applied:

$sub.allowTargetFutureDeviceFamilies = DeepCopy-Object $json.allowTargetFutureDeviceFamilies

* Send the updated submission content so that the API knows what should be updated:

Set-ApplicationSubmission -AppId $appId -UpdatedSubmission $sub
Set-ApplicationSubmission -AppId $appId -UpdatedSubmission $sub

* If you're updating screenshots or packages, you'll need to upload the supporting .zip file:

Set-SubmissionPackage -PackagePath <pathToYourZip> -UploadUrl ($sub.fileUploadUrl)
Set-SubmissionPackage -PackagePath <pathToYourZip> -UploadUrl ($sub.fileUploadUrl)

* Tell the API that you're done with the submission and to start validation / certification:

Complete-ApplicationSubmission -AppId $appId -SubmissionId ($sub.id)
Complete-ApplicationSubmission -AppId $appId -SubmissionId ($sub.id)

The `-AutoCommit` switch should not be confused with publishing of the submission. A submission
won't enter into certification until it has been "committed", and a submission can only be committed
Expand Down
4 changes: 2 additions & 2 deletions StoreBroker/Helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function Format-SimpleTableString
}
}

function DeepCopy-Object
function Copy-ObjectDeep
<#
.SYNOPSIS
Creates a deep copy of a serializable object.
Expand Down Expand Up @@ -253,7 +253,7 @@ function DeepCopy-Object
#>
{
[CmdletBinding()]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseApprovedVerbs", "", Justification="Intentional. This isn't exported, and needed to be explicit relative to Copy-Object.")]
[Alias('DeepCopy-Object')]
param(
[Parameter(Mandatory)]
[PSCustomObject] $Object
Expand Down
4 changes: 3 additions & 1 deletion StoreBroker/StoreBroker.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
CompanyName = 'Microsoft Corporation'
Copyright = 'Copyright (C) Microsoft Corporation. All rights reserved.'

ModuleVersion = '1.0.0'
ModuleVersion = '1.0.1'
Description = 'Provides command-line access to the Windows Store Submission REST API.'

RootModule = 'StoreIngestionApi'
Expand All @@ -29,6 +29,7 @@
'Complete-ApplicationFlightSubmission',
'Complete-ApplicationSubmission',
'Complete-InAppProductSubmission',
'Copy-ObjectDeep',
'Format-Application',
'Format-ApplicationFlight',
'Format-ApplicationFlightSubmission',
Expand Down Expand Up @@ -88,6 +89,7 @@
'Commit-IapSubmission',
'Commit-InAppProductSubmission',
'Complete-InAppProductSubmission',
'DeepCopy-Object',
'Format-ApplicationIaps',
'Format-Iap',
'Format-IapSubmission',
Expand Down

0 comments on commit 96d5ec4

Please sign in to comment.