Skip to content

Commit

Permalink
Adding fix for container:release command (#3047)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbosio authored Oct 23, 2024
1 parent dd7146f commit 7fe2ee3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/cli/src/commands/container/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export default class ContainerRelease extends Command {
})
}

const {body: oldReleases} = await this.heroku.get<Heroku.Release[]>(`/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: {
Expand All @@ -87,11 +92,6 @@ export default class ContainerRelease extends Command {
})
ux.action.stop()

const {body: oldReleases} = await this.heroku.get<Heroku.Release[]>(`/apps/${app}/releases`, {
partial: true, headers: {Range: 'version ..; max=2, order=desc'},
})
const oldRelease = oldReleases[0]

const {body: updatedReleases} = await this.heroku.get<Heroku.Release[]>(`/apps/${app}/releases`, {
partial: true, headers: {Range: 'version ..; max=1, order=desc'},
})
Expand Down

0 comments on commit 7fe2ee3

Please sign in to comment.