forked from Tencent/feflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: 正确输出安装错误信息 * ci: 自动识别 dist-tag Co-authored-by: alexqxxu <[email protected]>
- Loading branch information
Showing
4 changed files
with
38 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const semverRegExp = | ||
/^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/g; | ||
|
||
const { GITHUB_REF_NAME: tagName } = process.env; | ||
const matchResult = semverRegExp.exec(tagName); | ||
let distTag = 'latest'; | ||
if (matchResult) { | ||
[, , , , , distTag = 'latest'] = matchResult; | ||
} | ||
// 注意:此脚本只能输出 dist tag,不能输出其他 log,否则会污染 stdout 导致无法正常发布! | ||
console.log(`DIST_TAG=${distTag}`); |