def pkg_docs(self):
    with self.stage('Package Docs') as s:
        print('Packaging docs at {0}'.format(DOCS_DIR))
        docs_output = DOCS_FORMAT.format(version=self.vars.version)
        docs_output_file = (docs_output + '.tgz')
        transform_command = 's/{0}/{1}/'.format(DOCS_DIR, docs_output)
        if (platform.system() == 'Darwin'):
            transform_command = '/{0}/{1}/'.format(DOCS_DIR, docs_output)
            s.run_cmd('tar', '-cvz', '-s', transform_command, '-f', docs_output_file, (DOCS_DIR + '/'))
        else:
            s.run_cmd('tar', '-cvzf', docs_output_file, (DOCS_DIR + '/'), '--transform', transform_command)
def pkg_docs(self):
    with self.stage('Package Docs') as s:
        print('Packaging docs at {0}'.format(DOCS_DIR))
        docs_output = DOCS_FORMAT.format(version=self.vars.version)
        docs_output_file = (docs_output + '.tgz')
        transform_command = 's/{0}/{1}/'.format(DOCS_DIR, docs_output)
        if (platform.system() == 'Darwin'):
            transform_command = '/{0}/{1}/'.format(DOCS_DIR, docs_output)
            s.run_cmd('tar', '-cvz', '-s', transform_command, '-f', docs_output_file, (DOCS_DIR + '/'))
        else:
            s.run_cmd('tar', '-cvzf', docs_output_file, (DOCS_DIR + '/'), '--transform', transform_command)