示例#1
0
文件: build.py 项目: tstyle/doxx
 def write_project_runner_key(self, project_key_path):
     key_data_string = "\n\n"  # maintain a couple of newlines between the build specification section and the key data section
     if len(self.key_data) > 0:
         for the_key in self.key_data:
             key_data_string = key_data_string + the_key + ": " + self.key_data[the_key] + "\n" # recreate the YAML from the local key.yaml file to append to the project.yaml file
     # if there is no key data, not necessary to write any additional data to the file.  when doxx key is instantiated it will handle the lack of replacement data
     
     # append the local key file ('key.yaml') key data to the project meta data to prepare for the build
     try:
         fw = FileWriter(project_key_path)
         fw.append(key_data_string)  # append local key data to the project.yaml file
     except Exception as e:
         stderr("[!] doxx: Unable to write the temporary key file for your project build. Error: " + str(e), exit=1)