Skip to content

Commit

Permalink
feat: support parser and mongo driver (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
qianmoQ authored Dec 4, 2024
2 parents 34f1820 + 591f0c9 commit a2797d2
Show file tree
Hide file tree
Showing 189 changed files with 6,801 additions and 2,707 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bofore_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
-Dcos.access="$COS_ACCESS" -Dcos.secret="$COS_SECRET" -Dcos.bucket="$COS_BUCKET" -Dcos.endpoint="$COS_ENDPOINT" \
-Ds3.access="$S3_ACCESS" -Ds3.secret="$S3_SECRET" -Ds3.bucket="$S3_BUCKET" -Ds3.endpoint="$S3_ENDPOINT"
before_checker_package:
runs-on: ubuntu-latest
needs:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
chmod 755 ./mvnw
./mvnw clean install package -Dspotbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true -q
- name: Cache binary
id: cache-binary
uses: actions/cache@v3
Expand All @@ -44,7 +45,7 @@ jobs:
with:
path: |
./Dockerfile
./dist/datacap-server-${{ needs.before-compile.outputs.APP_VERSION }}-bin.tar.gz
./dist/datacap-server-${{ steps.apply_version.outputs.APP_VERSION }}-bin.tar.gz
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ depcheck-output.json
parser/datacap-parser-mysql/src/main/java
parser/datacap-parser-trino/src/main/java/*.tokens
parser/datacap-parser-trino/src/main/java/io/edurt/datacap/parser/antlr
core/datacap-parser/src/main/java/*.tokens
core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/*.java
core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/*.interp
!core/datacap-parser/src/main/java/io/edurt/datacap/sql/node

# Skip convert #
convert/datacap-convert-txt/*.txt
Expand Down
2 changes: 1 addition & 1 deletion client/datacap-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion configure/etc/bin/install-plugin.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

HOME=$(pwd)
VERSION=2024.4.0
VERSION=2024.4.1-SNAPSHOT
CDN_CENTER="https://repo1.maven.org/maven2/io/edurt/datacap"

install_package() {
Expand Down
2 changes: 1 addition & 1 deletion configure/etc/conf/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################### Banner configure #################################
app.version=2024.4.0
app.version=2024.4.1-SNAPSHOT

################################### Basic configure #################################
server.port=9096
Expand Down
402 changes: 201 additions & 201 deletions configure/metadata.json

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions configure/publish/publish-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/bin/sh

# Check if Docker is installed and running
# 检查 Docker 是否已安装并正在运行
if ! command -v docker &> /dev/null; then
echo "Error: Docker is not installed"
echo "错误:Docker 未安装"
exit 1
fi

# Check if Docker daemon is running
# 检查 Docker 守护进程是否运行
if ! docker info &> /dev/null; then
echo "Error: Docker daemon is not running"
echo "错误:Docker 守护进程未运行"
exit 1
fi

# Check if Docker buildx is available
# 检查 Docker buildx 是否可用
if ! docker buildx version &> /dev/null; then
echo "Error: Docker buildx is not available"
echo "错误:Docker buildx 不可用"
exit 1
fi

# Get Maven project version
# 获取 Maven 项目版本号
APP_VERSION=`./mvnw -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN -Dorg.slf4j.simpleLogger.log.org.apache.maven.plugins.help=INFO | tail -1`

# Check if version was successfully retrieved
# 检查版本号是否成功获取
if [ -z "$APP_VERSION" ]; then
echo "Error: Failed to get application version"
echo "错误:获取应用版本失败"
exit 1
fi

# Print the version that will be used
# 打印将要使用的版本号
echo "Building version: ${APP_VERSION}"
echo "构建版本:${APP_VERSION}"

# Create and use a new builder instance
# 创建并使用新的构建器实例
echo "Setting up Docker buildx..."
echo "设置 Docker buildx..."
docker buildx create --use

# Check if Dockerfile exists
# 检查 Dockerfile 是否存在
if [ ! -f "Dockerfile" ]; then
echo "Error: Dockerfile not found"
echo "错误:未找到 Dockerfile"
exit 1
fi

# Build multi-architecture images and push to Docker Hub
# - Platform: linux/amd64 (Intel/AMD) and linux/arm64 (ARM)
# - Tags: version specific and latest
# 构建多架构镜像并推送到 Docker Hub
# - 平台: linux/amd64 (Intel/AMD) 和 linux/arm64 (ARM)
# - 标签: 特定版本和最新版
echo "Building and pushing Docker images..."
echo "构建并推送 Docker 镜像..."
if docker buildx build --platform linux/amd64,linux/arm64 \
-t devliveorg/datacap:${APP_VERSION} \
-t devliveorg/datacap:latest \
. --push; then
# Print success message
# 打印成功信息
echo "Successfully built and pushed images:"
echo "成功构建并推送以下镜像:"
echo "- devliveorg/datacap:${APP_VERSION}"
echo "- devliveorg/datacap:latest"
else
echo "Error: Failed to build and push Docker images"
echo "错误:构建并推送 Docker 镜像失败"
exit 1
fi
10 changes: 9 additions & 1 deletion configure/publish/publish-newVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,16 @@ job_runner_apply() {

echo "Apply new version for metadata ..."
# Update version and URL in metadata.json using perl
# 更新 version 字段
perl -i -pe 's/"version": "[^"]*"/"version": "'"$VERSION"'"/' "$HOME/configure/metadata.json"
perl -i -pe 's|/plugins/[^/]+/|/plugins/'"$VERSION"'/|g' "$HOME/configure/metadata.json"

# 更新 url 字段中的版本号 (针对类似 2024.4.0 这样的版本格式)
# Update the version number in the url field (for a version format like 2024.4.0)
perl -i -pe 's/\/\d{4}\.\d+\.\d+\//\/'"$VERSION"'\//' "$HOME/configure/metadata.json"
perl -i -pe 's/-\d{4}\.\d+\.\d+-bin/-'"$VERSION"'-bin/' "$HOME/configure/metadata.json"

# 更新发布日期
# Update publish date
perl -i -pe 's/"released": "[^"]*"/"released": "'"$CURRENT_DATE"'"/' "$HOME/configure/metadata.json"

printf "Apply new version for web ...\n"
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-csv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-none/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-txt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion core/datacap-captcha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/datacap-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/datacap-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.4.0</version>
<version>2024.4.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Loading

0 comments on commit a2797d2

Please sign in to comment.