Skip to content

Commit

Permalink
Merge branch 'Tencent:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
cyw3 authored Jan 10, 2025
2 parents c133ecf + f13ad27 commit aeff313
Show file tree
Hide file tree
Showing 12 changed files with 3,546 additions and 3,174 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
uses: actions/checkout@v3

# 下载二进制文件
- name: Download Binary Files
run: |
set -ex
pwd
bash ./scripts/base/install_bin.sh
# - name: Download Binary Files
# run: |
# set -ex
# pwd
# bash ./scripts/base/install_bin.sh

- name: Setup Node 16
uses: actions/setup-node@v3
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,33 @@ jobs:
git remote add origin https://github.com/${GITHUB_REPOSITORY}.git
git fetch --all
for branch in `git branch -a | grep remotes | grep -v HEAD`; do
git branch --track ${branch##*/} $branch
git branch --track ${branch#remotes/origin/} $branch
done
env:
GITHUB_REPOSITORY: Tencent/CodeAnalysis

- name: Push to TGIT
run: |
remote_repo="https://${TGIT_USERNAME}:${TGIT_PASSWORD}@git.code.tencent.com/${TGIT_REPOSITORY}.git"
git remote add tencent "${remote_repo}"
git remote add tgit "${remote_repo}"
git show-ref
git branch --verbose
git push --all --force tencent
git push --tags --force tencent
git push --all --force tgit
git push --tags --force tgit
env:
TGIT_REPOSITORY: Tencent_Open_Source/CodeAnalysis
TGIT_USERNAME: ${{ secrets.USERNAME }}
TGIT_PASSWORD: ${{ secrets.PASSWORD }}
continue-on-error: true

- name: Push to Gitee
- name: Push to CNB
run: |
remote_repo="https://${GITEE_USERNAME}:${GITEE_PASSWORD}@gitee.com/${GITEE_REPOSITORY}.git"
git remote add gitee "${remote_repo}"
git show-ref
git branch --verbose
git push --all --force gitee
git push --tags --force gitee
remote_repo="https://${CNB_USERNAME}:${CNB_PASSWORD}@cnb.cool/${CNB_REPOSITORY}.git"
git remote add cnb "${remote_repo}"
git push --all --force cnb
git push --tags --force cnb
env:
GITEE_REPOSITORY: zhang9w0v5/CodeAnalysis
GITEE_USERNAME: ${{ secrets.GITEE_USERNAME }}
GITEE_PASSWORD: ${{ secrets.GITEE_PASSWORD }}
CNB_REPOSITORY: tca/code-analysis
CNB_USERNAME: ${{ secrets.CNB_USERNAME }}
CNB_PASSWORD: ${{ secrets.CNB_PASSWORD }}

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Before submitting a pull request, please make sure the followings are done:
6. Now, you can submit your pull request on `dev` branch.

## License
[MIT LICENSE](LICENSE) is the open source license of TCA. Code contributed by anyone is protected by this license. Please make sure that you can accept the license before contributing your code.
[MIT LICENSE](LICENSE.txt) is the open source license of TCA. Code contributed by anyone is protected by this license. Please make sure that you can accept the license before contributing your code.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<em>code-named: CodeDog</em>
</p>

[![license](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat)](LICENSE) [![docs](https://img.shields.io/badge/docs-read-brightgreen.svg?style=flat)](https://tencent.github.io/CodeAnalysis/)
[![license](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat)](LICENSE.txt) [![docs](https://img.shields.io/badge/docs-read-brightgreen.svg?style=flat)](https://tencent.github.io/CodeAnalysis/)

English | [简体中文](README_ZH.md)

Expand Down Expand Up @@ -77,7 +77,7 @@ Using TCA can help team find normative, structural, security vulnerabilities and

## License

TCA is [MIT licensed](LICENSE)
TCA is [MIT licensed](LICENSE.txt)

### TCA Team Member

Expand Down
4 changes: 2 additions & 2 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<em>代号:CodeDog</em>
</p>

[![license](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat)](LICENSE) [![docs](https://img.shields.io/badge/docs-read-brightgreen.svg?style=flat)](https://tencent.github.io/CodeAnalysis/)
[![license](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat)](LICENSE.txt) [![docs](https://img.shields.io/badge/docs-read-brightgreen.svg?style=flat)](https://tencent.github.io/CodeAnalysis/)

## TCA-官方网址

Expand Down Expand Up @@ -75,7 +75,7 @@

## 许可

TCA 使用 [MIT 许可证](LICENSE)
TCA 使用 [MIT 许可证](LICENSE.txt)

### TCA 团队成员

Expand Down
4 changes: 3 additions & 1 deletion doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
.temp
.cache
dist
dist
tca_lib*
images
2 changes: 1 addition & 1 deletion doc/en/community/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ TCA有两个主要分支:
6. 现在,您可以向 `dev` 分支提交Pull Request。

## 许可
[MIT LICENSE](https://github.com/Tencent/CodeAnalysis/blob/main/LICENSE) 是 TCA 的开源许可证。任何人贡献的代码都受此许可证保护。在贡献代码之前,请确保您可以接受许可。
[MIT LICENSE](https://github.com/Tencent/CodeAnalysis/blob/main/LICENSE.txt) 是 TCA 的开源许可证。任何人贡献的代码都受此许可证保护。在贡献代码之前,请确保您可以接受许可。
4 changes: 2 additions & 2 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"type": "module",
"license": "MIT",
"scripts": {
"dev": "vuepress dev",
"dev": "bash ./sync_images.sh & vuepress dev",
"build:comment": "echo '构建帮助文档,默认base前缀为document,可根据部署需要进行相应调整'",
"build": "BASE=${BASE:-CodeAnalysis} vuepress build -d ./dist"
"build": "bash ./sync_images.sh & BASE=${BASE:-CodeAnalysis} vuepress build -d ./dist"
},
"devDependencies": {
"@vuepress/plugin-search": "2.0.0-beta.63",
Expand Down
34 changes: 34 additions & 0 deletions doc/sync_images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# url=${LIB_GITHUB_URL}

# filename=$(basename "$url")
# dirname=${filename%.*}

# lib_image_path="${dirname}/tca_lib/doc/images"
# image_path="images"

# if [[ ! -d $image_path ]]; then
# if [[ ! -d $lib_image_path ]]; then
# if [[ ! -f $filename ]]; then
# wget $url
# fi
# unzip $filename -d $dirname
# fi
# cp -r $lib_image_path $image_path
# fi

# 当前
CURRENT_PATH=$(
cd "$(dirname "${BASH_SOURCE[0]}")"
pwd
)

# 根目录
ROOT_PATH=$(dirname "${CURRENT_PATH}")

cd ${ROOT_PATH}

bash "${ROOT_PATH}"/scripts/base/install_bin.sh

cd ${CURRENT_PATH}
2 changes: 1 addition & 1 deletion doc/zh/community/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ TCA有两个主要分支:
6. 现在,您可以向 `dev` 分支提交Pull Request。

## 许可
[MIT LICENSE](https://github.com/Tencent/CodeAnalysis/blob/main/LICENSE) 是 TCA 的开源许可证。任何人贡献的代码都受此许可证保护。在贡献代码之前,请确保您可以接受许可。
[MIT LICENSE](https://github.com/Tencent/CodeAnalysis/blob/main/LICENSE.txt) 是 TCA 的开源许可证。任何人贡献的代码都受此许可证保护。在贡献代码之前,请确保您可以接受许可。
2 changes: 1 addition & 1 deletion web/packages/webpack/src/config-webpack-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class ConfigWebpackPlugin {
compiler.hooks.done.tap(PLUGIN_NAME, ({ compilation }: Stats) => {
// 用于dev,生成api.json url
if (IS_DEV) {
const { devServer } = compilation.options;
const { devServer } = compilation.options as any;
const https = devServer?.https || false;
const host = devServer?.host || 'localhost';
const port = devServer?.port || '8080';
Expand Down
Loading

0 comments on commit aeff313

Please sign in to comment.