deploy.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:Harbor-CLI 作者: srishanbhattarai 项目源码 文件源码
def show_summary(self):
        '''
        This shows the summary of the current deployment process to the user.
        No more user interaction happens after this point.
        '''
        # TODO: colors not working properly
        green = colorprint('GREEN', bail_result=True)
        yellow = colorprint('YELLOW', bail_result=True)
        red = colorprint('RED', bail_result=True)

        summary_data = [
            [
                'Detail Item',
                'Description'
            ],
            [
                green('Package Name: '),
                yellow(self.projectdetails['packagename'])
            ],
            [
                green('Name: '),
                yellow(self.projectdetails['name'] or self.projectdetails['packagename'])
            ],
            [
                green('Build Type:'),
                yellow('Release' if self.is_release_build else 'Debug')
            ],
            [
                green('Deploy version: '),
                yellow(self.version) if self.version else red('N/A')
            ],
            [
                green('APK Size: '),
                yellow('~' + str(self.builddetails['size']) + 'MB')
            ],
            [
                green('Signed Status: '),
                yellow('Signed' if self.builddetails['is_signed'] else 'Not Signed')
            ],
            [
                green('Current deployer: '),
                yellow(self.deployer)
            ],
            [
                green('Current branch: '),
                yellow(git.branch())
            ]
        ]
        table = SingleTable(summary_data)

        print(table.table)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号