diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2025-10-15 14:23:38 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2025-10-16 09:38:32 +0200 |
| commit | 77853d7297269c09c998d3c0927aaae10148232f (patch) | |
| tree | df96237c8fb4c5f4a18956677319cbe2565fe0b4 /desktop/scripts | |
| parent | c6d0ab25db2e6554b666ef5109c153b6a5936ad8 (diff) | |
| download | mullvadvpn-77853d7297269c09c998d3c0927aaae10148232f.tar.xz mullvadvpn-77853d7297269c09c998d3c0927aaae10148232f.zip | |
Use git diff-index to check for dirty working directory
Should be functionally equivalent to the previous code, but cleaner and
simpler
Diffstat (limited to 'desktop/scripts')
| -rwxr-xr-x | desktop/scripts/release/1-prepare-release | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop/scripts/release/1-prepare-release b/desktop/scripts/release/1-prepare-release index da6aed637d..b76487d5cb 100755 --- a/desktop/scripts/release/1-prepare-release +++ b/desktop/scripts/release/1-prepare-release @@ -37,7 +37,7 @@ function checks { exit 1 fi - if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then + if ! git diff-index --quiet HEAD --; then log_error "Dirty working directory! Will not accept that for an official release." exit 1 fi @@ -82,7 +82,7 @@ function check_changelog { function update_copyright_year { $REPO_ROOT/scripts/update-copyright - if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then + if ! git diff-index --quiet HEAD --; then print_and_run git commit -a -S -m "Update copyright year in project files and code" fi } |
