Closed raduiman-zz closed 5 years ago
else:
self.local_version = None
self.commit_number = 0
into start_git()
self.list_of_commits.update(self._generate_first_element())
from _write_git_json
into start_git()
_write_git_json
to suite every scenario of writing to file(see the comment in the code)Tested the code by running it with no files present locally and then re-running it multiple times. No errors
_get-release() - https://github.com/mozilla-releng/firefox-infra-changelog/commit/86704202c9a3397bcadf2e48690362b42c6933b4
This commit changes the method to return a release version of our choosing by accepting an integer argument. If the argument is "1" it will return the latest version, "2" will return the second to latest version, and so on
_generate_first_element() - https://github.com/mozilla-releng/firefox-infra-changelog/commit/72e30c75764df11e7f1f8e1567397bd47b8c5ee3
This method will generate the element 0 for the .json files. It will contain the last check date and the last official release.
_write_git_json() - https://github.com/mozilla-releng/firefox-infra-changelog/commit/72e30c75764df11e7f1f8e1567397bd47b8c5ee3
This method will update the .json files. It will fuse the first element, the new commit dictionary and the old commit dictionary all in one and call the save function to write the .json.