From f6264bcc86f60495675123fdd4be0d9e1f8b81f8 Mon Sep 17 00:00:00 2001 From: NateScarlet Date: Tue, 24 Nov 2020 20:51:25 +0800 Subject: [PATCH] chore: check diff when not specified --release --- update.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update.py b/update.py index 79fd937..7b64e11 100755 --- a/update.py +++ b/update.py @@ -83,10 +83,6 @@ def main(): filenames.append(filename) print('') - if not is_release: - print('Updated repository data, skip release since not specified `--release`') - return - subprocess.run(['hub', 'add', *filenames], check=True) diff = subprocess.run(['hub', 'diff', '--stat', '--cached', '*.json'], check=True, @@ -96,6 +92,10 @@ def main(): print('Already up to date.') return + if not is_release: + print('Updated repository data, skip release since not specified `--release`') + return + tag = now.strftime('%Y.%m.%d') temp_note_fd, temp_note_name = mkstemp() with open(temp_note_fd, 'w', encoding='utf-8') as f: