MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / have_beta_notes_been_updated

Function have_beta_notes_been_updated

Scripts/get-release-notes.py:97–114  ·  view source on GitHub ↗

Returns True if the beta notes have been updated since the last tag, or if the version isn't a beta, or if it's the first beta

(version)

Source from the content-addressed store, hash-verified

95 return get_version_notes(version_num, changes)
96
97def have_beta_notes_been_updated(version):
98 '''
99 Returns True if the beta notes have been updated since the last tag, or if the version
100 isn't a beta, or if it's the first beta
101 '''
102
103 version_num, beta_tag, beta_num = get_version_parts(version)
104 if not beta_tag or beta_num == 1:
105 return True
106
107 all_tags = subprocess.check_output(['git', 'tag', '--sort=-taggerdate'], universal_newlines=True)
108 last_tag = all_tags.split('\n')[0]
109
110 diff_output = subprocess.check_output(['git', 'diff', '--name-only', last_tag, 'HEAD',
111 '--', BETANOTES_FILEPATH])
112
113 # Will be 'beta-notes.md' if it has changed, blank otherwise
114 return bool(diff_output)
115
116def get_beta_notes(beta_num, change_notes):
117 '''

Callers 1

Calls 1

get_version_partsFunction · 0.85

Tested by

no test coverage detected