コード例 #1
0
ファイル: lib_search.py プロジェクト: rciper/OVALRepo
    def set_indexed_commit_hash(self):
        """ Persists the git commit hash that the index was built on. """
        current_commit_hash = lib_git.get_current_commit_hash()

        filepath = os.path.join(lib_repo.get_scripts_path(), '__index__', self.index_name, 'git.commit.base.txt' )
        with open(filepath, 'wt') as f:
            f.write(current_commit_hash)
コード例 #2
0
    def set_indexed_commit_hash(self):
        """ Persists the git commit hash that the index was built on. """
        current_commit_hash = lib_git.get_current_commit_hash()

        filepath = os.path.join(lib_repo.get_scripts_path(), '__index__', self.index_name, 'git.commit.base.txt' )
        with open(filepath, 'wt') as f:
            f.write(current_commit_hash)
コード例 #3
0
ファイル: lib_search.py プロジェクト: rciper/OVALRepo
 def index_based_on_current_commit(self):
     """ Is the index based on the current commit? """
     current_commit = lib_git.get_current_commit_hash()
     indexed_commit = self.get_indexed_commit_hash()
     if indexed_commit == current_commit:
         return True
     else:
         return False
コード例 #4
0
ファイル: lib_search.py プロジェクト: trace-security/OVALRepo
 def index_based_on_current_commit(self):
     """ Is the index based on the current commit? """
     current_commit = lib_git.get_current_commit_hash()
     indexed_commit = self.get_indexed_commit_hash()
     if indexed_commit == current_commit:
         return True
     else:
         return False