55 */
66import { join } from "../../../src/deno_ral/path.ts" ;
77import { info } from "../../../src/deno_ral/log.ts" ;
8+ import { logPandoc } from "../../../src/core/log.ts" ;
89
910import { execProcess } from "../../../src/core/process.ts" ;
1011import { Configuration , withWorkingDir } from "./config.ts" ;
@@ -34,7 +35,7 @@ export function archiveUrl(
3435// Archives dependencies (if they are not present in the archive already)
3536export async function archiveBinaryDependencies ( _config : Configuration ) {
3637 await withWorkingDir ( async ( workingDir ) => {
37- info ( ` Updating binary dependencies...\n `) ;
38+ await logPandoc ( `## Updating binary dependencies`) ;
3839
3940 for ( const dependency of kDependencies ) {
4041 await archiveBinaryDependency ( dependency , workingDir ) ;
@@ -45,7 +46,7 @@ export async function archiveBinaryDependencies(_config: Configuration) {
4546// Archives dependencies (if they are not present in the archive already)
4647export async function checkBinaryDependencies ( _config : Configuration ) {
4748 await withWorkingDir ( async ( workingDir ) => {
48- info ( `Updating binary dependencies...\n `) ;
49+ await logPandoc ( `## Checking binary dependencies`) ;
4950
5051 for ( const dependency of kDependencies ) {
5152 await checkBinaryDependency ( dependency , workingDir ) ;
@@ -99,10 +100,9 @@ export async function archiveBinaryDependency(
99100 dependency : Dependency ,
100101 workingDir : string ,
101102) {
102- info ( `** ${ dependency . name } ${ dependency . version } **` ) ;
103+ await logPandoc ( `## ${ dependency . name } ${ dependency . version } \n\nChecking archive status...` , "markdown" ) ;
103104
104105 const dependencyBucketPath = `${ dependency . bucket } /${ dependency . version } ` ;
105- info ( "Checking archive status...\n" ) ;
106106
107107 const archive = async (
108108 architectureDependency : ArchitectureDependency ,
@@ -117,7 +117,7 @@ export async function archiveBinaryDependency(
117117
118118 const dependencyAwsPath =
119119 `${ kBucket } /${ dependencyBucketPath } /${ platformDep . filename } ` ;
120- info ( `Checking ${ dependencyAwsPath } ` ) ;
120+ await logPandoc ( `Checking \` ${ dependencyAwsPath } \`` , "markdown" ) ;
121121 const response = await s3cmd ( "ls" , [ dependencyAwsPath ] ) ;
122122 if ( response ?. includes ( 'Unable to locate credentials' ) ) {
123123 throw new Error ( "Unable to locate S3 credentials, please try again." ) ;
@@ -126,8 +126,8 @@ export async function archiveBinaryDependency(
126126
127127 if ( ! response ) {
128128 // This dependency doesn't exist, archive it
129- info (
130- `Archiving ${ dependencyBucketPath } - ${ platformDep . filename } ` ,
129+ await logPandoc (
130+ `Archiving \` ${ dependencyBucketPath } \` - ${ platformDep . filename } ` ,
131131 ) ;
132132
133133 // Download the file
@@ -144,23 +144,18 @@ export async function archiveBinaryDependency(
144144 "--acl" ,
145145 "public-read" ,
146146 ] ) ;
147-
148- info ( `(Reponse): ${ result } ` ) ;
149-
147+ info ( ` (Response): ${ result } ` ) ;
150148 } else {
151- info ( `${ dependencyAwsPath } already archived.` ) ;
149+ info ( ` ${ dependencyAwsPath . split ( "/" ) . slice ( - 1 ) [ 0 ] } already archived.\n ` ) ;
152150 }
153151 }
154152 }
155153 } ;
156154
157155 for ( const arch of Object . keys ( dependency . architectureDependencies ) ) {
158- info ( `Archiving ${ dependency . name } ` ) ;
159156 const archDep = dependency . architectureDependencies [ arch ] ;
160157 await archive ( archDep ) ;
161158 }
162-
163- info ( "" ) ;
164159}
165160
166161async function s3cmd ( cmd : string , args : string [ ] ) {
0 commit comments