@@ -5,21 +5,17 @@ const img = 'nozich/bunode'
5
5
async function main ( ) {
6
6
await $ `docker pull ${ img } :latest`
7
7
8
- // linux/arm64, linux/amd64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/arm/v7, linux/arm/v6
8
+ // Anil's MB Pro 250225: linux/arm64, linux/amd64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/arm/v7, linux/arm/v6
9
9
const inspect = await $ `docker buildx inspect | grep 'Platforms:' | sed 's/Platforms: //'` . text ( ) ;
10
10
11
11
// Manuelly set the platforms
12
- const inspects = [ ] ;
13
- if ( inspect . includes ( 'linux/arm64' ) ) {
14
- inspects . push ( 'linux/arm64' ) ;
15
- }
16
- if ( inspect . includes ( 'linux/amd64' ) ) {
17
- inspects . push ( 'linux/amd64' ) ;
18
- }
19
-
12
+ const inspectionList = [ ] ;
13
+ if ( inspect . includes ( 'linux/arm64' ) ) { inspectionList . push ( 'linux/arm64' ) ; }
14
+ if ( inspect . includes ( 'linux/amd64' ) ) { inspectionList . push ( 'linux/amd64' ) ; }
15
+ const inspects = inspectionList . join ( ',' ) ;
20
16
console . log ( `inspects` , inspects ) ;
21
17
22
- const platforms = inspects . split ( ',' ) . map ( e => e . trim ( ) ) . map ( ( p ) => ( {
18
+ const platforms = inspects . join ( ',' ) . split ( ',' ) . map ( e => e . trim ( ) ) . map ( ( p ) => ( {
23
19
platform : p ,
24
20
os : p . split ( '/' ) [ 0 ] ,
25
21
arch : p . split ( '/' ) [ 1 ] ,
@@ -32,8 +28,7 @@ async function main() {
32
28
const built = ( await Promise . all ( platforms . map ( async ( { platform, tag } ) => {
33
29
console . log ( { platform, img, tag } ) ;
34
30
35
- const build = await $ `docker buildx build --platform=${ platform } -t ${ img } :${ tag } --push .` . text ( )
36
- . catch ( ( e ) => e ) ;
31
+ const build = await $ `docker buildx build --platform=${ platform } -t ${ img } :${ tag } --push .` ;
37
32
38
33
console . log ( { platform, tag, build } ) ;
39
34
0 commit comments