@ -100,9 +100,6 @@ pub(crate) fn write_json(
folder
folder
} ;
} ;
// We make sure we are using the latest commit information in GitHub pages:
update_gh_pages_repo ( output_dir . as_path ( ) , verbose ) ;
if verbose ! = 0 {
if verbose ! = 0 {
println! ( "Writing the results to {}..." , output_dir . display ( ) ) ;
println! ( "Writing the results to {}..." , output_dir . display ( ) ) ;
}
}
@ -170,33 +167,6 @@ fn get_test262_commit(test262_path: &Path) -> Result<Box<str>> {
Ok ( commit_id . into_boxed_str ( ) )
Ok ( commit_id . into_boxed_str ( ) )
}
}
/// Updates the GitHub pages repository by pulling latest changes before writing the new things.
fn update_gh_pages_repo ( path : & Path , verbose : u8 ) {
if env ::var ( "GITHUB_REF" ) . is_ok ( ) {
use std ::process ::Command ;
// We run the command to pull the gh-pages branch: git -C ../gh-pages/ pull origin
Command ::new ( "git" )
. args ( [ "-C" , "../gh-pages" , "pull" , "--ff-only" ] )
. output ( )
. expect ( "could not update GitHub Pages" ) ;
// Copy the full results file
let from = Path ::new ( "../gh-pages/test262/refs/heads/main/" ) . join ( RESULTS_FILE_NAME ) ;
let to = path . join ( RESULTS_FILE_NAME ) ;
if verbose ! = 0 {
println! (
"Copying the {} file to {} in order to add the results" ,
from . display ( ) ,
to . display ( )
) ;
}
fs ::copy ( from , to ) . expect ( "could not copy the main results file" ) ;
}
}
/// Compares the results of two test suite runs.
/// Compares the results of two test suite runs.
#[ allow(clippy::cast_possible_wrap) ]
#[ allow(clippy::cast_possible_wrap) ]
pub ( crate ) fn compare_results ( base : & Path , new : & Path , markdown : bool ) -> Result < ( ) > {
pub ( crate ) fn compare_results ( base : & Path , new : & Path , markdown : bool ) -> Result < ( ) > {