Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openshot
Openshot Qt
提交
ef7036d4
O
Openshot Qt
项目概览
openshot
/
Openshot Qt
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Openshot Qt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ef7036d4
编写于
2月 24, 2021
作者:
J
Jonathan Thomas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Renaming release candidate files before uploading artifacts
上级
d3198e38
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
9 deletion
+21
-9
installer/deploy.py
installer/deploy.py
+19
-3
installer/version_parser.py
installer/version_parser.py
+2
-6
未找到文件。
installer/deploy.py
浏览文件 @
ef7036d4
...
...
@@ -30,6 +30,7 @@ import sys
import
datetime
import
platform
import
traceback
import
re
from
github3
import
login
from
requests.auth
import
HTTPBasicAuth
from
requests
import
post
,
get
...
...
@@ -37,6 +38,7 @@ from build_server import output, run_command, error, truncate, zulip_upload_log,
errors_detected
,
log
,
version_info
,
parse_version_info
PATH
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)))
# Primary openshot folder
RELEASE_NAME_REGEX
=
re
.
compile
(
r
'^OpenShot-v.*?(-.*?)\.'
)
# Access info class (for version info)
sys
.
path
.
append
(
os
.
path
.
join
(
PATH
,
'src'
,
'classes'
))
...
...
@@ -163,9 +165,23 @@ if __name__ == "__main__":
# NOTE: ONLY for `openshot-qt` repo
# github_release_url = github_release.html_url
github_release
=
releases
.
get
(
'openshot-qt'
)
for
artifact_name
in
os
.
listdir
(
artifact_dir
):
artifact_path
=
os
.
path
.
join
(
artifact_dir
,
artifact_name
)
if
os
.
path
.
exists
(
artifact_path
)
and
os
.
path
.
splitext
(
artifact_name
)[
-
1
]
in
[
'.exe'
,
'.dmg'
,
'.AppImage'
,
'.torrent'
]:
for
artifact_orig_name
in
os
.
listdir
(
artifact_dir
):
artifact_path_orig
=
os
.
path
.
join
(
artifact_dir
,
artifact_orig_name
)
match
=
RELEASE_NAME_REGEX
.
match
(
artifact_orig_name
)
if
match
and
match
.
groups
():
# Rename artifact before uploading
file_name_pattern
=
match
.
groups
()[
0
]
artifact_name
=
artifact_orig_name
.
replace
(
file_name_pattern
,
""
)
artifact_path
=
os
.
path
.
join
(
artifact_dir
,
artifact_name
)
os
.
rename
(
artifact_path_orig
,
artifact_path
)
else
:
# Leave artifact with the original name
artifact_name
=
artifact_orig_name
artifact_path
=
artifact_path_orig
artifact_base
,
artifact_ext
=
os
.
path
.
splitext
(
artifact_name
)
if
os
.
path
.
exists
(
artifact_path
)
and
artifact_ext
in
[
'.exe'
,
'.dmg'
,
'.AppImage'
,
'.torrent'
,
'.verify'
,
'.sha256sum'
]:
# Valid artifact/installer - Upload to GitHub Release
output
(
"GitHub: Uploading %s to GitHub Release: %s"
%
(
artifact_path
,
github_release
.
tag_name
))
download_url
=
upload
(
artifact_path
,
github_release
)
...
...
installer/version_parser.py
浏览文件 @
ef7036d4
...
...
@@ -32,7 +32,6 @@ import datetime
PATH
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)))
# Primary openshot folder
sys
.
path
.
append
(
os
.
path
.
join
(
PATH
,
'src'
,
'classes'
))
import
info
def
parse_version_info
(
version_path
):
...
...
@@ -68,9 +67,6 @@ def parse_build_name(version_info, git_branch_name=""):
if
git_branch_name
.
startswith
(
"release"
):
# Release candidate
release_label
=
"release-candidate"
elif
git_branch_name
==
"master"
:
# Release
release_label
=
""
else
:
# Daily
release_label
=
"daily"
...
...
@@ -80,7 +76,7 @@ def parse_build_name(version_info, git_branch_name=""):
if
release_label
:
# Daily and Release Candidates
build_name
=
"OpenShot-v%s-%s-%s-%s-%s"
%
(
info
.
VERSION
,
version_info
.
get
(
'openshot-qt'
,
{}).
get
(
'VERSION'
)
,
release_label
,
version_info
.
get
(
'openshot-qt'
,
{}).
get
(
'CI_PIPELINE_ID'
,
'NA'
),
version_info
.
get
(
'libopenshot'
,
{}).
get
(
'CI_COMMIT_SHA'
,
'NA'
)[:
8
],
...
...
@@ -88,7 +84,7 @@ def parse_build_name(version_info, git_branch_name=""):
)
else
:
# Official releases
build_name
=
"OpenShot-v%s"
%
info
.
VERSION
build_name
=
"OpenShot-v%s"
%
version_info
.
get
(
'openshot-qt'
,
{}).
get
(
'VERSION'
)
return
build_name
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录