mirror of
https://github.com/wcbing/wcbing-apt-repo.git
synced 2025-12-29 02:28:30 +08:00
Compare commits
No commits in common. "e2828ab4fad9fafa5ccdcbf2a83668253bf24044" and "251b5233c52623dcfb56cb0a5aaab5bb6d29f611" have entirely different histories.
e2828ab4fa
...
251b5233c5
@ -70,14 +70,6 @@
|
|||||||
| [DBeaver](https://github.com/dbeaver/dbeaver) | dbeaver-ce | ✅ | |
|
| [DBeaver](https://github.com/dbeaver/dbeaver) | dbeaver-ce | ✅ | |
|
||||||
| [Joplin](https://github.com/laurent22/joplin) | joplin | ✅ | |
|
| [Joplin](https://github.com/laurent22/joplin) | joplin | ✅ | |
|
||||||
| [SPlayer](https://github.com/imsyy/SPlayer) | splayer | ✅ | |
|
| [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
|
### 合并自现有 repo
|
||||||
|
|
||||||
|
|||||||
@ -117,19 +117,5 @@
|
|||||||
"file_list": {
|
"file_list": {
|
||||||
"amd64": "Joplin-{version}.deb"
|
"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 = argparse.ArgumentParser()
|
||||||
parser.add_argument("-d", "--data", default="data", help="从 <DATA> 读取仓库配置")
|
parser.add_argument("-d", "--data", default="data", help="从 <DATA> 读取仓库配置")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-p", "--proxy", default="", help="Github 代理"
|
"-p", "--proxy", default="", help="Github 代理,<PROXY> 必须以 / 结尾"
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-t", "--thread", type=int, default=5, help="并发下载线程数量,默认为 5"
|
"-t", "--thread", type=int, default=5, help="并发下载线程数量,默认为 5"
|
||||||
@ -36,13 +36,11 @@ if __name__ == "__main__":
|
|||||||
tasks = []
|
tasks = []
|
||||||
with ThreadPoolExecutor(max_workers=CONFIG["thread"]) as executor:
|
with ThreadPoolExecutor(max_workers=CONFIG["thread"]) as executor:
|
||||||
for name, repo in github_info_list.items():
|
for name, repo in github_info_list.items():
|
||||||
if "site" in repo:
|
release_url = (
|
||||||
repo_url = os.path.join(repo["site"], repo['repo'])
|
f'{CONFIG["proxy"]}https://github.com/{repo["repo"]}/releases'
|
||||||
else:
|
)
|
||||||
# 默认认为是 GitHub 仓库地址,同时使用代理
|
|
||||||
repo_url = os.path.join(CONFIG["proxy"], "https://github.com", repo["repo"])
|
|
||||||
# get latest releases tag 获取最新版本标签
|
# get latest releases tag 获取最新版本标签
|
||||||
location = requests.head(repo_url + "/releases/latest").headers.get("Location", "")
|
location = requests.head(release_url + "/latest").headers.get("Location", "")
|
||||||
match = re.search(r".*releases/tag/(.*)", location)
|
match = re.search(r".*releases/tag/(.*)", location)
|
||||||
if not match:
|
if not match:
|
||||||
continue
|
continue
|
||||||
@ -54,7 +52,7 @@ if __name__ == "__main__":
|
|||||||
release_file = file_name.format(
|
release_file = file_name.format(
|
||||||
releases_tag=releases_tag, version=version
|
releases_tag=releases_tag, version=version
|
||||||
)
|
)
|
||||||
file_url = f"{repo_url}/releases/download/{releases_tag}/{release_file}"
|
file_url = f"{release_url}/download/{releases_tag}/{release_file}"
|
||||||
# 提交任务到线程池
|
# 提交任务到线程池
|
||||||
tasks.append(
|
tasks.append(
|
||||||
executor.submit(check_download, name, version, file_url, arch)
|
executor.submit(check_download, name, version, file_url, arch)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user