Skip to content

Commit

Permalink
Guard git stash in pre-release with DRY_RUN
Browse files Browse the repository at this point in the history
  • Loading branch information
Gtker committed Oct 10, 2024
1 parent af6a1fb commit 91dffd7
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions pre-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,25 @@ export CARGO_INCREMENTAL=0

cargo install cargo-hack --locked

# CHANGELOG and Cargo.toml are changed
git stash
if [ -z "${DRY_RUN}" ]; then
echo "DRY_RUN not set"
# CHANGELOG and Cargo.toml are changed
git stash
else
echo "DRY_RUN set"
fi

cargo gen
git diff-files --quiet

# CHANGELOG and Cargo.toml are changed
git stash pop

if [ -z "${DRY_RUN}" ]; then
echo "DRY_RUN not set"
# CHANGELOG and Cargo.toml are changed
git stash pop
else
echo "DRY_RUN set"
fi

cargo test --all-features -p $1

Expand Down

0 comments on commit 91dffd7

Please sign in to comment.