Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
myhjmzy
code-server
提交
299e17e6
C
code-server
项目概览
myhjmzy
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
299e17e6
编写于
3月 24, 2021
作者:
J
Joe Previte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: update script command to get git branch
上级
a1dca6da
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
11 deletion
+17
-11
.github/PULL_REQUEST_TEMPLATE/release_template.md
.github/PULL_REQUEST_TEMPLATE/release_template.md
+1
-0
ci/build/release-prep.sh
ci/build/release-prep.sh
+12
-8
ci/dev/update-vscode.sh
ci/dev/update-vscode.sh
+4
-3
未找到文件。
.github/PULL_REQUEST_TEMPLATE/release_template.md
浏览文件 @
299e17e6
<!-- Note: this variable $CODE_SERVER_VERSION_TO_UPDATE will be set when you run the release-prep.sh script with `yarn release:prep` -->
This PR is to generate a new release of
`code-server`
at
`$CODE_SERVER_VERSION_TO_UPDATE`
## Screenshot
...
...
ci/build/release-prep.sh
浏览文件 @
299e17e6
...
...
@@ -5,7 +5,7 @@
# 2. Update the version of code-server (package.json, docs, etc.)
# 3. Update the code coverage badge in the README
# 4. Open a draft PR using the release_template.md and view in browser
# If you want to perform a dry run of this script run DRY_RUN=
0
yarn release:prep
# If you want to perform a dry run of this script run DRY_RUN=
1
yarn release:prep
set
-euo
pipefail
...
...
@@ -78,10 +78,7 @@ main() {
read
-r
-p
"What version of code-server do you want to update to?"
$'
\n
'
CODE_SERVER_VERSION_TO_UPDATE
echo
-e
"Great! We'll prep a PR for updating to
$CODE_SERVER_VERSION_TO_UPDATE
\n
"
# I can't tell you why but
# when searching with rg, the version needs to in this format: '3\.7\.5'
# that's why we have the parameter expansion with the regex
$CMD
rg
-g
'!yarn.lock'
-g
'!*.svg'
--files-with-matches
"
${
CODE_SERVER_CURRENT_VERSION
//\./\\.
}
"
|
$CMD
xargs sd
"
$CODE_SERVER_CURRENT_VERSION
"
"
$CODE_SERVER_VERSION_TO_UPDATE
"
$CMD
rg
-g
'!yarn.lock'
-g
'!*.svg'
--files-with-matches
--fixed-strings
"
${
CODE_SERVER_CURRENT_VERSION
}
"
|
$CMD
xargs sd
"
$CODE_SERVER_CURRENT_VERSION
"
"
$CODE_SERVER_VERSION_TO_UPDATE
"
# Ensure the tests are passing and code coverage is up-to-date
echo
-e
"Running unit tests and updating code coverage...
\n
"
...
...
@@ -91,12 +88,19 @@ main() {
# Updates the svg to be green for the badge
$CMD
sd
"red.svg"
"green.svg"
../../README.md
$CMD
git
add
.
&&
$CMD
git
commit
-am
"chore(release): bump version to
$CODE_SERVER_VERSION_TO_UPDATE
"
$CMD
git commit
-am
"chore(release): bump version to
$CODE_SERVER_VERSION_TO_UPDATE
"
CURRENT_BRANCH
=
$(
git branch
--show-current
)
# Note: we need to set upstream as well or the gh pr create step will fail
# See: https://github.com/cli/cli/issues/575
$CMD
git push
-u
origin
"
$CURRENT_BRANCH
"
CURRENT_BRANCH
=
$(
git branch |
grep
'\*'
|
cut
-d
' '
-f2-
)
if
[[
-z
$(
git config
"branch.
${
CURRENT_BRANCH
}
.remote"
)
]]
;
then
echo
"Doesn't look like you've pushed this branch to remote"
echo
-e
"Pushing now using: git push origin
$CURRENT_BRANCH
\n
"
# Note: we need to set upstream as well or the gh pr create step will fail
# See: https://github.com/cli/cli/issues/575
echo
"Please set the upstream and re-run the script"
exit
1
fi
# This runs from the root so that's why we use this path vs. ../../
RELEASE_TEMPLATE_STRING
=
$(
cat
./.github/PULL_REQUEST_TEMPLATE/release_template.md
)
...
...
ci/dev/update-vscode.sh
浏览文件 @
299e17e6
...
...
@@ -81,13 +81,14 @@ main() {
# Push branch to remote if not already pushed
# If we don't do this, the opening a draft PR step won't work
# because it will stop and ask where you want to push the branch
CURRENT_BRANCH
=
$(
git branch
--show-current
)
if
[[
-z
$(
git
ls-remote
--heads
origin
"
$CURRENT_BRANCH
"
)
]]
;
then
CURRENT_BRANCH
=
$(
git branch
|
grep
'\*'
|
cut
-d
' '
-f2-
)
if
[[
-z
$(
git
config
"branch.
${
CURRENT_BRANCH
}
.remote
"
)
]]
;
then
echo
"Doesn't look like you've pushed this branch to remote"
echo
-e
"Pushing now using: git push origin
$CURRENT_BRANCH
\n
"
# Note: we need to set upstream as well or the gh pr create step will fail
# See: https://github.com/cli/cli/issues/575
git push
-u
origin
"
$CURRENT_BRANCH
"
echo
"Please set the upstream and re-run the script"
exit
1
fi
echo
"Going to try to update vscode for you..."
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录