mirror of
https://github.com/wcbing/wcbing-apt-repo.git
synced 2025-12-28 18:18:31 +08:00
Compare commits
3 Commits
251b5233c5
...
e2828ab4fa
| Author | SHA1 | Date | |
|---|---|---|---|
| e2828ab4fa | |||
| 5e8559b1c8 | |||
| 51a7d954e6 |
@ -70,6 +70,14 @@
|
||||
| [DBeaver](https://github.com/dbeaver/dbeaver) | dbeaver-ce | ✅ | |
|
||||
| [Joplin](https://github.com/laurent22/joplin) | joplin | ✅ | |
|
||||
| [SPlayer](https://github.com/imsyy/SPlayer) | splayer | ✅ | |
|
||||
| [Tiny RDM](https://github.com/tiny-craft/tiny-rdm) | tinyrdm | ✅ | |
|
||||
|
||||
#### Gitee
|
||||
|
||||
| 软件名 | 包名 | amd64 | arm64 |
|
||||
| ----- | --- | ----- | ----- |
|
||||
| [星火应用商店](https://gitee.com/spark-store-project/spark-store) | spark-store | ✅ | ✅ |
|
||||
|
||||
|
||||
### 合并自现有 repo
|
||||
|
||||
|
||||
@ -117,5 +117,19 @@
|
||||
"file_list": {
|
||||
"amd64": "Joplin-{version}.deb"
|
||||
}
|
||||
},
|
||||
"spark-store": {
|
||||
"site": "https://gitee.com",
|
||||
"repo": "spark-store-project/spark-store",
|
||||
"file_list": {
|
||||
"amd64": "spark-store_{releases_tag}_amd64.deb",
|
||||
"arm64": "spark-store_{releases_tag}_arm64.deb"
|
||||
}
|
||||
},
|
||||
"tinyrdm": {
|
||||
"repo": "tiny-craft/tiny-rdm",
|
||||
"file_list": {
|
||||
"amd64": "tiny-rdm_{version}_linux_amd64_webkit2_41.deb"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -17,7 +17,7 @@ def read_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-d", "--data", default="data", help="从 <DATA> 读取仓库配置")
|
||||
parser.add_argument(
|
||||
"-p", "--proxy", default="", help="Github 代理,<PROXY> 必须以 / 结尾"
|
||||
"-p", "--proxy", default="", help="Github 代理"
|
||||
)
|
||||
parser.add_argument(
|
||||
"-t", "--thread", type=int, default=5, help="并发下载线程数量,默认为 5"
|
||||
@ -36,11 +36,13 @@ if __name__ == "__main__":
|
||||
tasks = []
|
||||
with ThreadPoolExecutor(max_workers=CONFIG["thread"]) as executor:
|
||||
for name, repo in github_info_list.items():
|
||||
release_url = (
|
||||
f'{CONFIG["proxy"]}https://github.com/{repo["repo"]}/releases'
|
||||
)
|
||||
if "site" in repo:
|
||||
repo_url = os.path.join(repo["site"], repo['repo'])
|
||||
else:
|
||||
# 默认认为是 GitHub 仓库地址,同时使用代理
|
||||
repo_url = os.path.join(CONFIG["proxy"], "https://github.com", repo["repo"])
|
||||
# get latest releases tag 获取最新版本标签
|
||||
location = requests.head(release_url + "/latest").headers.get("Location", "")
|
||||
location = requests.head(repo_url + "/releases/latest").headers.get("Location", "")
|
||||
match = re.search(r".*releases/tag/(.*)", location)
|
||||
if not match:
|
||||
continue
|
||||
@ -52,7 +54,7 @@ if __name__ == "__main__":
|
||||
release_file = file_name.format(
|
||||
releases_tag=releases_tag, version=version
|
||||
)
|
||||
file_url = f"{release_url}/download/{releases_tag}/{release_file}"
|
||||
file_url = f"{repo_url}/releases/download/{releases_tag}/{release_file}"
|
||||
# 提交任务到线程池
|
||||
tasks.append(
|
||||
executor.submit(check_download, name, version, file_url, arch)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user