From 7fe2ee3d6d8928e401922f55df57d4c0f9440266 Mon Sep 17 00:00:00 2001 From: Santiago Bosio Date: Wed, 23 Oct 2024 12:18:45 -0300 Subject: [PATCH] Adding fix for container:release command (#3047) --- packages/cli/src/commands/container/release.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/commands/container/release.ts b/packages/cli/src/commands/container/release.ts index 02b8c14f68..be74672dd7 100644 --- a/packages/cli/src/commands/container/release.ts +++ b/packages/cli/src/commands/container/release.ts @@ -79,6 +79,11 @@ export default class ContainerRelease extends Command { }) } + const {body: oldReleases} = await this.heroku.get(`/apps/${app}/releases`, { + partial: true, headers: {Range: 'version ..; max=1, order=desc'}, + }) + const oldRelease = oldReleases[0] + ux.action.start(`Releasing images ${argv.join(',')} to ${app}`) await this.heroku.patch(`/apps/${app}/formation`, { body: {updates: updateData}, headers: { @@ -87,11 +92,6 @@ export default class ContainerRelease extends Command { }) ux.action.stop() - const {body: oldReleases} = await this.heroku.get(`/apps/${app}/releases`, { - partial: true, headers: {Range: 'version ..; max=2, order=desc'}, - }) - const oldRelease = oldReleases[0] - const {body: updatedReleases} = await this.heroku.get(`/apps/${app}/releases`, { partial: true, headers: {Range: 'version ..; max=1, order=desc'}, })