Skip to content

Commit

Permalink
xtask: Prevent accidental git commit deletion
Browse files Browse the repository at this point in the history
when dry-running a publish.
  • Loading branch information
har7an committed Aug 28, 2023
1 parent b4ee2ef commit 1c1c860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xtask/src/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ pub fn publish(sh: &Shell, flags: flags::Publish) -> anyhow::Result<()> {
// program. When dry-running we need to undo the release commit first!
let result = closure();

if flags.dry_run {
if flags.dry_run && !skip_build {
cmd!(sh, "git reset --hard HEAD~1")
.run()
.context(err_context)?;
Expand Down

0 comments on commit 1c1c860

Please sign in to comment.