Skip to content

Commit

Permalink
Uncommented /portalRevisions endpoint to enable publishing. (#1236)
Browse files Browse the repository at this point in the history
  • Loading branch information
azaslonov authored Apr 8, 2021
1 parent d75671a commit c45d7b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions scripts.v3/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,11 @@ async function migrate() {
try {
const sourceImporterExporter = new ImporterExporter(yargs.sourceSubscriptionId, yargs.sourceResourceGroupName, yargs.sourceServiceName, yargs.sourceTenantid, yargs.sourceServiceprincipal, yargs.sourceSecret);
await sourceImporterExporter.export();

const destIimporterExporter = new ImporterExporter(yargs.destSubscriptionId, yargs.destResourceGroupName, yargs.destServiceName, yargs.destTenantid, yargs.destServiceprincipal, yargs.destSecret);
await destIimporterExporter.cleanup();
await destIimporterExporter.import();

/* New publishing endpoint is not deployed to production yet. */
// await destIimporterExporter.publish();
await destIimporterExporter.publish();
}
catch (error) {
throw new Error(`Unable to complete migration. ${error.message}`);
Expand Down
3 changes: 1 addition & 2 deletions scripts.v3/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ class ImporterExporter {
const revision = timeStamp.toISOString().replace(/[\-\:\T]/g, "").substr(0, 14);
const url = `/portalRevisions/${revision}`;
const body = {
description: `Migration ${revision}.`,
isCurrent: true
description: `Migration ${revision}.`
}

await this.httpClient.sendRequest("PUT", url, body);
Expand Down

0 comments on commit c45d7b0

Please sign in to comment.