From ea7ce0eec7a00889abf8932b2e4d7a336ee8938c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Fri, 12 Jul 2024 15:54:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20mongosh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/jms-build-test.yml | 4 ++++ .github/workflows/release.yml | 4 ++++ VERSION | 2 +- prepare.sh | 9 ++++++++- tools.sh | 12 ++++++++++++ 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 tools.sh diff --git a/.github/workflows/jms-build-test.yml b/.github/workflows/jms-build-test.yml index a6be704..43987a7 100644 --- a/.github/workflows/jms-build-test.yml +++ b/.github/workflows/jms-build-test.yml @@ -23,6 +23,10 @@ jobs: applets_version=$(curl -s https://api.github.com/repos/jumpserver/applets/releases/latest | grep "tag_name" | awk '{print $2}' | sed 's/"//g' | sed 's/,//g') wget -qO opt/download/applets/pip_packages.zip https://github.com/jumpserver/applets/releases/download/${applets_version}/pip_packages.zip + - name: Get binaries + run: | + bash tools.sh + - name: Build and push uses: docker/build-push-action@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9d7d09..0be1c69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,6 +67,10 @@ jobs: rm -rf opt/player || echo "" applets_version=$(curl -s https://api.github.com/repos/jumpserver/applets/releases/latest | grep "tag_name" | awk '{print $2}' | sed 's/"//g' | sed 's/,//g') wget -qO opt/download/applets/pip_packages_${applets_version}.zip https://github.com/jumpserver/applets/releases/download/${applets_version}/pip_packages.zip + + - name: Get binaries + run: | + bash tools.sh - name: Create Tag run: | diff --git a/VERSION b/VERSION index f684230..85937e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v4.0.0 \ No newline at end of file +v4.0.1 \ No newline at end of file diff --git a/prepare.sh b/prepare.sh index a460002..f2bb2e8 100755 --- a/prepare.sh +++ b/prepare.sh @@ -11,6 +11,7 @@ MRD_VERSION=10.6.7 VIDEO_PLAYER_VERSION=0.1.9 OPENSSH_VERSION=v9.4.0.0 Client_VERSION=v2.1.3 +MONGOSH_VERSION=2.2.12 DOWNLOAD_URL=https://download.jumpserver.org @@ -47,4 +48,10 @@ wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Clie wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-mac-${Client_VERSION}-x64.dmg wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-mac-${Client_VERSION}-arm64.dmg wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-linux-${Client_VERSION}-amd64.deb -wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-linux-${Client_VERSION}-arm64.deb \ No newline at end of file +wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-linux-${Client_VERSION}-arm64.deb + +if [ "${USE_XPACK}" = "0" ]; then + for arch in x64 arm64 ppc64le s390x; do + wget --no-clobber https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VERSION}-linux-${arch}.tgz + done +fi \ No newline at end of file diff --git a/tools.sh b/tools.sh new file mode 100644 index 0000000..4bfabaf --- /dev/null +++ b/tools.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -ex + +MONGOSH_VERSION=2.2.12 + +PROJECT_DIR=$(cd `dirname $0`; pwd) + +cd ${PROJECT_DIR}/opt/download/public || exit 1 + +for arch in x64 arm64 ppc64le s390x; do + wget --no-clobber https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VERSION}-linux-${arch}.tgz +done \ No newline at end of file