Skip to content

Commit

Permalink
feat: logging and groups
Browse files Browse the repository at this point in the history
  • Loading branch information
BD103 committed Aug 7, 2024
1 parent 527c70e commit 8b66807
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ function downloadCargoSweep() {
*/
async function main(usePrebuilt) {
if (usePrebuilt) {
core.startGroup("Download pre-built `cargo-sweep`.");
downloadCargoSweep();
core.endGroup();
} else {
core.startGroup("Build `cargo-sweep` from scratch.");
await buildCargoSweep();
core.endGroup();
}

// Create timestamp.
core.info("Creating timestamp.");
await exec.exec("cargo", ["sweep", "--stamp"]);

// Move timestamp to `target/cargo-sweep`.
Expand Down
1 change: 1 addition & 0 deletions src/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ async function main() {
await io.mv("target/cargo-sweep/sweep.timestamp", ".");

// Remove everything older than timestamp.
core.info("Sweeping unused build files.");
await exec.exec("cargo", ["sweep", "--file"]);
}

Expand Down

0 comments on commit 8b66807

Please sign in to comment.