(path, outfile, directory=None)
| 184 | return outfile |
| 185 | |
| 186 | def gz_tree(path, outfile, directory=None): |
| 187 | # compress files and folders in path to outfile using tar:gz compression |
| 188 | |
| 189 | archive = tarfile.open(outfile, 'w:gz') |
| 190 | for root, dirs, files in os.walk(path): |
| 191 | for f in files: |
| 192 | p = os.path.join(root, f) |
| 193 | an = p |
| 194 | if directory: |
| 195 | an = os.path.relpath(p, directory) |
| 196 | archive.add(p, an) |
| 197 | |
| 198 | archive.close() |
| 199 | return outfile |
| 200 | |
| 201 | |
| 202 | def _get_tag_name(version, channel): # from build.py |
no test coverage detected