Skip to content

Commit

Permalink
only git add and cargo build when changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyr-7D1h committed Aug 7, 2022
1 parent 5c4e338 commit bfcdfa2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions script/release
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,10 @@ class Cargo(Module):
with open("Cargo.toml", "w") as file:
file.write(cargo_toml)

# Update lock file
exec("cargo build --release --offline")

exec("git add Cargo.toml Cargo.lock")
if exec("git diff") != "":
# Update lock file
exec("cargo build --release --offline")
exec("git add Cargo.toml Cargo.lock")
exec(f"git commit -m 'Release {VERSION}'")
exec("git push")

Expand Down

0 comments on commit bfcdfa2

Please sign in to comment.