Skip to content

Commit

Permalink
fix(promote:deb): skip i386 deb pkg if node < 10 (#1140)
Browse files Browse the repository at this point in the history
* fix(promote:deb): skip i386 deb pkg if node < 10

* fix: lte takes number
  • Loading branch information
cristiand391 committed Apr 14, 2023
1 parent f483d1c commit dd50d78
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/commands/promote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as path from 'path'
import * as _ from 'lodash'

import {ux, Command, Flags} from '@oclif/core'
import { lte } from 'semver'

import aws from '../aws'
import * as Tarballs from '../tarballs'
Expand Down Expand Up @@ -153,14 +154,25 @@ export default class Promote extends Command {
// copy debian artifacts
const debArtifacts = [
templateShortKey('deb', {bin: config.bin, versionShaRevision: debVersion(buildConfig), arch: 'amd64' as any}),
templateShortKey('deb', {bin: config.bin, versionShaRevision: debVersion(buildConfig), arch: 'i386' as any}),
'Packages.gz',
'Packages.xz',
'Packages.bz2',
'Release',
'InRelease',
'Release.gpg',
]

// start
// TODO: remove in next major release
// node dropped 32-bit support for linux a long time ago, see:
// https://github.com/oclif/oclif/issues/770#issuecomment-1508719530
const arches = buildConfig.targets.filter(t => t.platform === 'linux')

if (arches.find(a=> a.arch.includes('x86')) && lte(buildConfig.nodeVersion, '9.11.2')) {
debArtifacts.push(templateShortKey('deb', {bin: config.bin, versionShaRevision: debVersion(buildConfig), arch: 'i386' as any}))
}
// end

this.log(`Promoting debian artifacts to ${flags.channel}`)
await Promise.all(debArtifacts.flatMap(artifact => {
const debCopySource = cloudBucketCommitKey(`apt/${artifact}`)
Expand Down

0 comments on commit dd50d78

Please sign in to comment.