Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openshot
Openshot Qt
提交
2749faca
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 搜索 >>
提交
2749faca
编写于
2月 25, 2021
作者:
J
Jonathan Thomas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixing publish string replace issues
上级
7a32df78
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
8 deletion
+15
-8
installer/deploy.py
installer/deploy.py
+15
-8
未找到文件。
installer/deploy.py
浏览文件 @
2749faca
...
...
@@ -82,7 +82,8 @@ if __name__ == "__main__":
script_mode
=
"publish"
# Start log
output
(
"%s %s Log for %s"
%
(
platform
.
system
(),
script_mode
,
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d %H:%M:%S"
)))
output
(
"%s %s Log for %s"
%
(
platform
.
system
(),
script_mode
,
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d %H:%M:%S"
)))
# Detect artifact folder (if any)
artifact_dir
=
os
.
path
.
join
(
PATH
,
"build"
)
...
...
@@ -119,7 +120,8 @@ if __name__ == "__main__":
releases
[
repo_name
]
=
get_release
(
repos
.
get
(
repo_name
),
github_release_name
)
if
releases
.
get
(
repo_name
)
and
releases
.
get
(
repo_name
).
prerelease
is
False
:
raise
Exception
(
"GitHub release for version %s is already released. Did we forget to bump a "
"version? (repo: %s, branch: %s)"
%
(
github_release_name
,
repo_name
,
git_branch_name
))
"version? (repo: %s, branch: %s)"
%
(
github_release_name
,
repo_name
,
git_branch_name
))
else
:
# ignore all branches that don't start with 'release*'
raise
Exception
(
"%s only allowed for branch names that start with 'release*'"
...
...
@@ -268,9 +270,12 @@ if __name__ == "__main__":
(
r
.
status_code
,
os
.
getenv
(
'OPENSHOT_ORG_USER'
),
r
.
json
().
get
(
'message'
,
'no error message found'
)))
else
:
# Get release object
openshot_qt_version
=
version_info
.
get
(
'openshot-qt'
,
{}).
get
(
'VERSION'
,
'N/A'
)
# Publish the release (make new version visible on openshot.org, and make blog post visible)
auth
=
HTTPBasicAuth
(
os
.
getenv
(
'OPENSHOT_ORG_USER'
),
os
.
getenv
(
'OPENSHOT_ORG_PASS'
))
r
=
post
(
"https://www.openshot.org/api/release/publish/"
,
auth
=
auth
,
data
=
{
"version"
:
github_release
.
tag_name
})
r
=
post
(
"https://www.openshot.org/api/release/publish/"
,
auth
=
auth
,
data
=
{
"version"
:
openshot_qt_version
})
if
not
r
.
ok
:
raise
Exception
(
"HTTP post to openshot.org/api/release/publish/ failed: %s (user: %s): %s"
%
(
r
.
status_code
,
os
.
getenv
(
'OPENSHOT_ORG_USER'
),
...
...
@@ -284,7 +289,8 @@ if __name__ == "__main__":
# Publish github release also
github_release
.
edit
(
prerelease
=
False
)
else
:
raise
Exception
(
"Cannot publish missing GitHub release: %s"
%
github_release
.
tag_name
)
raise
Exception
(
"Cannot publish missing GitHub release: %s, version: %s"
%
(
repo_name
,
openshot_qt_version
))
# Verify download links on openshot.org are correct (and include the new release version)
r
=
get
(
"https://www.openshot.org/download/"
)
...
...
@@ -300,9 +306,9 @@ if __name__ == "__main__":
raise
Exception
(
"Validation of URL FAILED: %s, %s, %s"
%
(
url
,
r
.
status_code
,
r
.
reason
))
# Validate the current version is found in each URL
if
version_info
.
get
(
'openshot-qt'
,
{}).
get
(
'VERSION'
,
'N/A'
)
not
in
url
:
if
openshot_qt_version
not
in
url
:
raise
Exception
(
"Validation of URL FAILED. Missing version %s: %s, %s, %s"
%
(
version_info
.
get
(
'openshot-qt'
,
{}).
get
(
'VERSION'
,
'N/A'
)
,
url
,
(
openshot_qt_version
,
url
,
r
.
status_code
,
r
.
reason
))
else
:
raise
Exception
(
"Failed to GET openshot.org/download for URL validation: %s"
%
r
.
status_code
)
...
...
@@ -314,10 +320,11 @@ if __name__ == "__main__":
if
not
errors_detected
:
output
(
"Successfully completed %s script!"
%
script_mode
)
zulip_upload_log
(
zulip_token
,
log
,
"%s: %s **success** log
for *%s*"
%
(
platform
.
system
(),
script_mode
,
git_branch_nam
e
),
"%s: %s **success** log
"
%
(
platform
.
system
(),
script_mod
e
),
":congratulations: successful %s"
%
script_mode
)
else
:
# Report any errors detected
output
(
"%s script failed!"
%
script_mode
)
zulip_upload_log
(
zulip_token
,
log
,
"%s: %s error log for *%s*"
%
(
platform
.
system
(),
script_mode
,
git_branch_name
),
":skull_and_crossbones: %s"
%
truncate
(
errors_detected
[
0
],
100
))
zulip_upload_log
(
zulip_token
,
log
,
"%s: %s error log"
%
(
platform
.
system
(),
script_mode
),
":skull_and_crossbones: %s"
%
truncate
(
errors_detected
[
0
],
100
))
exit
(
1
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录