Fix build

This commit is contained in:
cxfksword
2022-10-13 22:39:59 +08:00
parent f9315f2d86
commit cf8e8c94d7
2 changed files with 16 additions and 5 deletions

View File

@@ -10,6 +10,8 @@ opts = parser.parse_args()
version = opts.version
prerelease = bool(opts.prerelease)
tag = os.popen('git describe --abbrev=0').read().strip()
changelog = os.popen("git tag -l --format='%(contents)' " + tag).read().strip()
artifact_dir = os.path.join(os.getcwd(), 'artifacts')
os.mkdir(artifact_dir)
@@ -27,18 +29,27 @@ version = '.'.join(version_list)
if prerelease:
jellyfin_repo_file = "./manifest-unstable.json"
jellyfin_old_manifest = "https://github.com/cxfksword/jellyfin-plugin-danmu/releases/manifest/download/manifest-unstable.json"
jellyfin_old_manifest = "https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download/manifest/manifest-unstable.json"
else:
jellyfin_repo_file = "./manifest.json"
jellyfin_old_manifest = "https://github.com/cxfksword/jellyfin-plugin-danmu/releases/manifest/download/manifest.json"
jellyfin_old_manifest = "https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download/manifest/manifest.json"
# download old manifest
jellyfin_manifest_template = "./doc/manifest-template.json"
os.system('wget -q "%s"' % (jellyfin_old_manifest))
os.system('wget -q -O "%s" "%s" ' % (jellyfin_repo_file, jellyfin_old_manifest))
if not os.path.isfile(jellyfin_repo_file):
os.system('cp -f %s %s' % (jellyfin_manifest_template, jellyfin_repo_file))
# update change log
build_yaml_file = "./build.yaml"
with open(build_yaml_file, 'r') as file:
data = file.read()
data = data.replace("NA", changelog)
with open(build_yaml_file, 'w') as file:
file.write(data)
# build and generate new manifest
jellyfin_repo_url = "https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download"

View File

@@ -2,8 +2,8 @@
{
"guid": "5b39da44-5314-4940-8e26-54c821c17f86",
"name": "Danmu",
"description": "jellyfin\u7684b\u7ad9\u5f39\u5e55\u81ea\u52a8\u4e0b\u8f7d\u63d2\u4ef6\uff0c\u4f1a\u5339\u914db\u7ad9\u756a\u5267/\u7535\u5f71\u89c6\u9891\uff0c\u81ea\u52a8\u4e0b\u8f7d\u5bf9\u5e94\u5f39\u5e55\uff0c\u5e76\u5b9a\u65f6\u66f4\u65b0\u3002\n",
"overview": "jellyfin\u5f39\u5e55\u4e0b\u8f7d\u63d2\u4ef6",
"description": "jellyfin的b站弹幕自动下载插件会匹配b站番剧/电影视频,自动下载对应弹幕,并定时更新。\n",
"overview": "jellyfin弹幕下载插件",
"owner": "cxfksword",
"category": "Metadata",
"imageUrl": "https://github.com/cxfksword/jellyfin-plugin-danmu/raw/main/doc/logo.png",