Tree.pm (563B)
1 package Bluto::Tree; 2 3 4 use File::Spec; 5 use File::Path qw / make_path /; 6 7 our $_release_path; 8 our $_announce_path; 9 10 sub release_path() { 11 return $_release_path; 12 } 13 sub announce_path() { 14 return $_announce_path; 15 } 16 17 sub prepare { 18 my $release = shift; 19 my $env = shift; 20 21 $env->{out_dir} = File::Spec->rel2abs($env->{out_dir}); 22 $_release_path = File::Spec->catfile($env->{out_dir}, 'src', $release->{slug}); 23 make_path(release_path); 24 $_announce_path = File::Spec->catfile($env->{out_dir}, 'announce', $release->{slug}); 25 make_path(announce_path); 26 27 return 0; 28 } 29 30 1;