fix: revert building mac m1 packages, wait for PR
MODIFY
src/commands/pack/macos.ts
src/commands/pack/macos.ts
import {Command, Flags} from '@oclif/core'
import {Interfaces} from '@oclif/core'
-import * as _ from 'lodash'
+import * as path from 'path'
import * as qq from 'qqjs'
import * as Tarballs from '../../tarballs'
@@ -145,13 +145,11 @@ the CLI should already exist in a directory named after the CLI that is the root
const macos = c.macos
const packageIdentifier = macos.identifier
await Tarballs.build(buildConfig, {platform: 'darwin', pack: false, tarball: flags.tarball})
- const scriptsDir = qq.join(buildConfig.tmp, 'macos/scripts')
- await qq.emptyDir(buildConfig.dist('macos'))
-
- const build = async (arch: Interfaces.ArchTypes) => {
const templateKey = templateShortKey('macos', {bin: config.bin, version: config.version, sha: buildConfig.gitSha})
const dist = buildConfig.dist(`macos/${templateKey}`)
- const rootDir = buildConfig.workspace({platform: 'darwin', arch})
+ await qq.emptyDir(path.dirname(dist))
+ const scriptsDir = qq.join(buildConfig.tmp, 'macos/scripts')
+ const rootDir = buildConfig.workspace({platform: 'darwin', arch: 'x64'})
const writeScript = async (script: 'preinstall' | 'postinstall' | 'uninstall') => {
const path = script === 'uninstall' ? [rootDir, 'bin'] : [scriptsDir]
path.push(script)
@@ -178,11 +176,4 @@ the CLI should already exist in a directory named after the CLI that is the root
args.push(dist)
await qq.x('pkgbuild', args as string[])
}
-
- const arches = _.uniq(buildConfig.targets
- .filter(t => t.platform === 'darwin')
- .map(t => t.arch))
- // eslint-disable-next-line no-await-in-loop
- for (const a of arches) await build(a)
- }
}

fix: revert building mac m1 packages, wait for PR #849 (#855)