Skip to content

Commit

Permalink
maintainers/upload-release.pl: Delete temporary directories when we'r…
Browse files Browse the repository at this point in the history
…e done

(cherry picked from commit 02bb633)
  • Loading branch information
edolstra committed Oct 31, 2024
1 parent d977522 commit f983ce6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion maintainers/upload-release.pl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ sub copyManual {
system("xz -d < '$manualNar' | nix-store --restore $tmpDir/manual.tmp") == 0
or die "unable to unpack $manualNar\n";
rename("$tmpDir/manual.tmp/share/doc/nix/manual", "$tmpDir/manual") or die;
system("rm -rf '$tmpDir/manual.tmp'") == 0 or die;
File::Path::remove_tree("$tmpDir/manual.tmp", {safe => 1});
}

system("aws s3 sync '$tmpDir/manual' s3://$releasesBucketName/$releaseDir/manual") == 0
Expand Down Expand Up @@ -254,3 +254,6 @@ sub downloadFile {
system("git tag --force --sign $version $nixRev -m 'Tagging release $version'") == 0 or die;
system("git push --tags") == 0 or die;
system("git push --force-with-lease origin $nixRev:refs/heads/latest-release") == 0 or die if $isLatest;

File::Path::remove_tree($narCache, {safe => 1});
File::Path::remove_tree($tmpDir, {safe => 1});

0 comments on commit f983ce6

Please sign in to comment.