@@ -16,7 +16,7 @@ use tracing::info;
1616use xz2:: read:: XzDecoder ;
1717
1818use crate :: {
19- check_hash,
19+ check_hash, create_tarball ,
2020 package:: { Info , Package , Source , StepVariant } ,
2121} ;
2222
@@ -29,7 +29,7 @@ pub async fn build() -> Result<()> {
2929
3030 let package = Package :: parse ( & fs:: read_to_string ( package_path) ?) ?;
3131
32- let info = package. info ;
32+ let info = & package. info ;
3333 info ! (
3434 "Building package \" {}\" version {}" ,
3535 & info. name, & info. version
@@ -45,17 +45,17 @@ pub async fn build() -> Result<()> {
4545 fs:: remove_dir_all ( "sources" ) ?;
4646 }
4747
48- for source in package. sources {
49- let file_path = fetch_and_verify_source ( & client, & source, & info) . await ?;
48+ for source in & package. sources {
49+ let file_path = fetch_and_verify_source ( & client, source, & info) . await ?;
5050 extract_source ( & file_path) ?;
5151 }
5252
5353 let mut working_dir = current_dir ( ) ?;
5454
55- for step in package. steps {
55+ for step in & package. steps {
5656 info ! ( "Running step: {}" , step. name) ;
5757
58- match step. variant {
58+ match & step. variant {
5959 StepVariant :: Command { command, runner } => {
6060 let result = runner
6161 . into_command ( )
@@ -75,7 +75,7 @@ pub async fn build() -> Result<()> {
7575 }
7676 }
7777
78- // create_tarball(path , &package)?;
78+ create_tarball ( current_dir ( ) ? . join ( "package" ) , & package) ?;
7979
8080 info ! ( "Package '{}' built successfully!" , info. name) ;
8181 Ok ( ( ) )
0 commit comments