diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2025-10-16 10:12:16 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2025-10-16 10:12:16 +0200 |
| commit | 14de14af48cb5c39d5216786c1663691043e1bd7 (patch) | |
| tree | ca9af3c1a7f146a49e52c7ef3d9c2ae9f5e0f7ec | |
| parent | c6d0ab25db2e6554b666ef5109c153b6a5936ad8 (diff) | |
| parent | 6aee839ffb31f78d24afe2c4c559aeeac24bc5c7 (diff) | |
| download | mullvadvpn-14de14af48cb5c39d5216786c1663691043e1bd7.tar.xz mullvadvpn-14de14af48cb5c39d5216786c1663691043e1bd7.zip | |
Merge branch 'better-dirty-working-directory-check'
| -rwxr-xr-x | build.sh | 2 | ||||
| -rwxr-xr-x | desktop/scripts/release/1-prepare-release | 4 | ||||
| -rwxr-xr-x | scripts/localization | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -120,7 +120,7 @@ else fi if [[ "$SIGN" == "true" ]]; then - if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then + if [[ -n $(git status --porcelain) ]]; then log_error "Dirty working directory!" log_error "Will only build a signed app in a clean working directory" exit 1 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 } diff --git a/scripts/localization b/scripts/localization index 084f61661c..965ca0ff17 100755 --- a/scripts/localization +++ b/scripts/localization @@ -51,7 +51,7 @@ function update_relay_locations_pot { } function commit_changes { - if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then + if ! git diff-index --quiet HEAD --; then git commit -a -S -m "$1" fi } |
