chore: check diff when not specified --release

This commit is contained in:
NateScarlet 2020-11-24 20:51:25 +08:00
parent 9a91dfd8f5
commit f6264bcc86
No known key found for this signature in database
GPG Key ID: 5C242793B070309C

View File

@ -83,10 +83,6 @@ def main():
filenames.append(filename) filenames.append(filename)
print('') print('')
if not is_release:
print('Updated repository data, skip release since not specified `--release`')
return
subprocess.run(['hub', 'add', *filenames], check=True) subprocess.run(['hub', 'add', *filenames], check=True)
diff = subprocess.run(['hub', 'diff', '--stat', '--cached', '*.json'], diff = subprocess.run(['hub', 'diff', '--stat', '--cached', '*.json'],
check=True, check=True,
@ -96,6 +92,10 @@ def main():
print('Already up to date.') print('Already up to date.')
return return
if not is_release:
print('Updated repository data, skip release since not specified `--release`')
return
tag = now.strftime('%Y.%m.%d') tag = now.strftime('%Y.%m.%d')
temp_note_fd, temp_note_name = mkstemp() temp_note_fd, temp_note_name = mkstemp()
with open(temp_note_fd, 'w', encoding='utf-8') as f: with open(temp_note_fd, 'w', encoding='utf-8') as f: