Skip to content

Commit

Permalink
Update testBuildArtifacts.cfc
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jul 24, 2024
1 parent acbbe21 commit d0785f9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/testBuildArtifacts.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="data-provider-inte
variables.artifacts = dir & "/artifacts";
if ( !DirectoryExists( variables.artifacts ))
directoryCreate( variables.artifacts );

variables.buildDir = getTempDirectory() & "/build-test-#createUniqueId()#/";
if ( DirectoryExists( variables.buildDir ) )
directoryDelete( variables.buildDir, true );
directoryCreate( variables.buildDir, true );

}

function run( testResults , testBox ) {
Expand Down Expand Up @@ -41,17 +35,23 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="data-provider-inte
}

private function buildArtifacts( version ){

var buildDir = getTempDirectory() & "/build-artifacts-#createUUID()#/";
if ( DirectoryExists( buildDir ) )
directoryDelete( buildDir, true );
directoryCreate( buildDir, true );

systemOutput( "--- buildArtifacts [#arguments.version#] ", true);
var srcJar = fetchLuceeJar( arguments.version );
FileCopy( srcJar, variables.buildDir & listLast( srcJar, "/\" ) );
FileCopy( srcJar, buildDir & listLast( srcJar, "/\" ) );

var s3 = new services.legacy.S3();
s3.init( variables.buildDir );
s3.init( buildDir );
s3.addMissing( includingForgeBox=true, skipMaven=true );

var produced = directoryList( path=variables.buildDir, recurse=true, listinfo="query" );
var produced = directoryList( path=buildDir, recurse=true, listinfo="query" );
for (var f in produced ) {
systemOutput( "", true );
systemOutput( f, true );
var fileCount = -1;
var zip = queryNew("");
try {
Expand Down

0 comments on commit d0785f9

Please sign in to comment.