@@ -14,7 +14,6 @@ import { ModuleInfo, PackageInfo, WidgetInfo } from "./package-info";
1414import { addFilesToPackageXml , PackageType } from "./package-xml" ;
1515import { chmod , cp , ensureFileExists , exec , find , mkdir , popd , pushd , rm , unzip , zip } from "./shell" ;
1616import chalk from "chalk" ;
17- import { findOssReadme } from "./oss-clearance" ;
1817
1918type Step < Info , Config > = ( params : { info : Info ; config : Config } ) => Promise < void > ;
2019
@@ -197,44 +196,6 @@ export async function addWidgetsToMpk({ config }: ModuleStepParams): Promise<voi
197196 rm ( "-rf" , target ) ;
198197}
199198
200- export async function addREADMEOSSToMpk ( { config, info } : ModuleStepParams ) : Promise < void > {
201- logStep ( "Add READMEOSS to mpk" ) ;
202-
203- // Check that READMEOSS file exists in package root and find it by name pattern
204- const packageRoot = config . paths . package ;
205- const widgetName = info . mxpackage . name ;
206- const version = info . version . format ( ) ;
207-
208- // We'll search for files matching the name and version, ignoring timestamp
209- const readmeossFile = findOssReadme ( packageRoot , widgetName , version ) ;
210-
211- if ( ! readmeossFile ) {
212- console . warn ( `⚠️ READMEOSS file not found for ${ widgetName } version ${ version } .` ) ;
213- console . warn ( ` Skipping READMEOSS addition to mpk.` ) ;
214- return ;
215- }
216-
217- console . info ( `Found READMEOSS file: ${ parse ( readmeossFile ) . base } ` ) ;
218-
219- const mpk = config . output . files . modulePackage ;
220- const mpkEntry = parse ( mpk ) ;
221- const target = join ( mpkEntry . dir , "tmp" ) ;
222-
223- rm ( "-rf" , target ) ;
224-
225- console . info ( "Unzip module mpk" ) ;
226- await unzip ( mpk , target ) ;
227- chmod ( "-R" , "a+rw" , target ) ;
228-
229- console . info ( `Add READMEOSS file to ${ mpkEntry . base } ` ) ;
230- // Copy the READMEOSS file to the target directory
231- cp ( readmeossFile , target ) ;
232-
233- console . info ( "Create module zip archive" ) ;
234- await zip ( target , mpk ) ;
235- rm ( "-rf" , target ) ;
236- }
237-
238199export async function moveModuleToDist ( { info, config } : ModuleStepParams ) : Promise < void > {
239200 logStep ( "Move module to dist" ) ;
240201
@@ -244,15 +205,6 @@ export async function moveModuleToDist({ info, config }: ModuleStepParams): Prom
244205 mkdir ( "-p" , join ( paths . dist , info . version . format ( ) ) ) ;
245206 // Can't use mv because of https://github.com/shelljs/shelljs/issues/878
246207 cp ( output . files . modulePackage , output . files . mpk ) ;
247-
248- // Prepare OSS clearance folder structure
249- const ossClearanceFolder = join ( paths . dist , "SBOM_GENERATOR" , `${ info . mxpackage . name } ${ info . version . format ( ) } ` ) ;
250- mkdir ( "-p" , ossClearanceFolder ) ;
251-
252- // Copy module package to OSS clearance folder
253- console . info ( `Copying module package to OSS clearance folder: ${ ossClearanceFolder } ` ) ;
254- cp ( output . files . modulePackage , join ( ossClearanceFolder , `${ info . mxpackage . name } ${ info . version . format ( ) } .mpk` ) ) ;
255-
256208 rm ( output . files . modulePackage ) ;
257209}
258210
0 commit comments