我试图将pyinstaller与私有repo的更新功能集成。我的问题是,是否有一种方法可以将pyupdater与免费替代方案(如:bitbucket私有repo)集成?Pyupdater通常适用于公共repo,但我无法弄清楚如何在私有repo上实现这一点。
配置文件:
配置文件:
class ClientConfig(object):
PUBLIC_KEY = 'None'
APP_NAME = 'dad123'
COMPANY_NAME = 'dad123'
UPDATE_URLS = ['ssh://git@bitbucket.org/Tysondogerz/ssh/download']
MAX_DOWNLOAD_RETRIES = 3
创建一个ssh很容易:
ssh-keygen -t rsa -C "youremail@example.com"
那么...
Main.py
#!/usr/bin/env python3
from __future__ import print_function
import time
import argparse
import os
import signal
import sys
import logging
from selenium import webdriver
logging.basicConfig(level=logging.DEBUG)
from client_config import ClientConfig
from pyupdater.client import Client, AppUpdate, LibUpdate
Ssh_key = DWDJKWNADKJWANDJKWANDWJKDNAWJKDNWAKDNWAJDKWANDJKWANDWAJKDNWAKJDWNADKJWANDWAJKDNAWJKDNWAJKDNWAJKDWNADJKWANDJKWANDKJWADNWAJKDNWAJKNWQWQDWQNDJKQWNDJKWQNDWQJKDNWQJKDNWKJDNWKJANDWJKNDWJKNDWDUWDNWDHDUIWHDIUWHDUIWHDUIWHDIUWHDUIWHDWUDHWUIHDWUDHUhottyouremail@example.com
client = Client(ClientConfig(), ssh={'ssh_key'})
from pyupdater.client import Client
from client_config import ClientConfig
def print_status_info(info):
total = info.get(u'total')
downloaded = info.get(u'downloaded')
status = info.get(u'status')
print downloaded, total, status
client = Client(ClientConfig())
client.refresh()
client.add_progress_hook(print_status_info)
client = Client(ClientConfig(), refresh=True,
progress_hooks=[print_status_info])
lib_update = client.update_check(ASSET_NAME, ASSET_VERSION)
lib_update = client.update_check(ASSET_NAME, ASSET_VERSION, channel='beta')
if lib_update is not None:
lib_update.download()
driver = webdriver.Firefox()
driver.get('http://stackoverflow.com')
if __name__ == "__main__":
main()
ClientConfig.UPDATE_URLS[0]
上呢? - Hetzronihttps://api.bitbucket.org/2.0/repositories/Tysondogerz/more/downloads
)进行身份验证? - Jim Redmond