diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c96b07b1..c9a3b5a4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -78,7 +78,7 @@ jobs: - name: Build connector definition run: | set -e pipefail - export DOCKER_IMAGE="ghcr.io/hasura/mongodb-connector:$GITHUB_REF_NAME" + export DOCKER_IMAGE="ghcr.io/hasura/ndc-mongodb:$GITHUB_REF_NAME" export CLI_VERSION=$GITHUB_REF_NAME make build working-directory: ./connector-definition @@ -168,11 +168,11 @@ jobs: cargo build --release --package=mongodb-cli-plugin mkdir -p release - mv -v target/${{ matrix.target }}/release/hasura-mongodb release/hasura-mongodb-${{ matrix.target }}${{ matrix.extension }} + mv -v target/${{ matrix.target }}/release/mongodb-cli-plugin release/mongodb-cli-plugin-${{ matrix.target }}${{ matrix.extension }} - uses: actions/upload-artifact@v4 with: - name: hasura-mongodb-${{ matrix.target }}${{ matrix.extension }} + name: mongodb-cli-plugin-${{ matrix.target }}${{ matrix.extension }} path: release if-no-files-found: error diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index a4564c46..092ba2db 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -3,10 +3,6 @@ name = "mongodb-cli-plugin" edition = "2021" version.workspace = true -[[bin]] -name = "hasura-mongodb" -path = "./src/main.rs" - [dependencies] configuration = { path = "../configuration" } mongodb-agent-common = { path = "../mongodb-agent-common" } diff --git a/deploy.sh b/deploy.sh index f49063fa..98b7004d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -6,7 +6,7 @@ # set -euo pipefail -IMAGE_PATH=ghcr.io/hasura/ndc-mongo +IMAGE_PATH=ghcr.io/hasura/ndc-mongodb if [ -z "${1+x}" ]; then echo "Expected argument of the form refs/heads/ or refs/tags/." diff --git a/nix/docker-cli-plugin.nix b/nix/docker-cli-plugin.nix index e28ae550..5d523776 100644 --- a/nix/docker-cli-plugin.nix +++ b/nix/docker-cli-plugin.nix @@ -7,6 +7,6 @@ dockerTools.buildLayeredImage { inherit name; created = "now"; config = { - Entrypoint = [ "${mongodb-cli-plugin}/bin/hasura-mongodb" ]; + Entrypoint = [ "${mongodb-cli-plugin}/bin/mongodb-cli-plugin" ]; }; } diff --git a/nix/docker.nix b/nix/docker.nix index 7f3b7d5f..d4639d61 100644 --- a/nix/docker.nix +++ b/nix/docker.nix @@ -3,7 +3,7 @@ , dockerTools , lib , architecture ? null -, name ? "ghcr.io/hasura/mongodb-connector" +, name ? "ghcr.io/hasura/ndc-mongodb" # See config options at https://github.com/moby/docker-image-spec/blob/main/spec.md , extraConfig ? { } diff --git a/scripts/generate-manifest.sh b/scripts/generate-manifest.sh index 4cd54d00..5d8a17ad 100755 --- a/scripts/generate-manifest.sh +++ b/scripts/generate-manifest.sh @@ -3,11 +3,11 @@ set -evo pipefail ROOT="$(pwd)" -export LINUX_AMD64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep hasura-mongodb-x86_64-unknown-linux-gnu | cut -f1 -d' ') -export MACOS_AMD64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep hasura-mongodb-x86_64-apple-darwin | cut -f1 -d' ') -export WINDOWS_AMD64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep hasura-mongodb-x86_64-pc-windows-msvc.exe | cut -f1 -d' ') -export LINUX_ARM64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep hasura-mongodb-aarch64-unknown-linux-gnu | cut -f1 -d' ') -export MACOS_ARM64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep hasura-mongodb-aarch64-apple-darwin | cut -f1 -d' ') +export LINUX_AMD64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep mongodb-cli-plugin-x86_64-unknown-linux-gnu | cut -f1 -d' ') +export MACOS_AMD64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep mongodb-cli-plugin-x86_64-apple-darwin | cut -f1 -d' ') +export WINDOWS_AMD64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep mongodb-cli-plugin-x86_64-pc-windows-msvc.exe | cut -f1 -d' ') +export LINUX_ARM64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep mongodb-cli-plugin-aarch64-unknown-linux-gnu | cut -f1 -d' ') +export MACOS_ARM64_SHA256=$(cat ${ROOT}/release/artifacts/sha256sum | grep mongodb-cli-plugin-aarch64-apple-darwin | cut -f1 -d' ') (echo "cat <${ROOT}/release/manifest.yaml"; cat ${ROOT}/scripts/manifest.yaml; echo; echo EOF; diff --git a/scripts/manifest.yaml b/scripts/manifest.yaml index 025753f7..b818e670 100644 --- a/scripts/manifest.yaml +++ b/scripts/manifest.yaml @@ -1,40 +1,40 @@ -name: ndc-mongo +name: mongodb version: "${VERSION}" -shortDescription: "CLI plugin for Hasura ndc-mongo" +shortDescription: "CLI plugin for Hasura ndc-mongodb" homepage: https://hasura.io/connectors/mongo platforms: - selector: darwin-arm64 - uri: "https://github.com/hasura/ndc-mongo/releases/download/${VERSION}/hasura-mongodb-aarch64-apple-darwin" + uri: "https://github.com/hasura/ndc-mongodb/releases/download/${VERSION}/mongodb-cli-plugin-aarch64-apple-darwin" sha256: "${MACOS_ARM64_SHA256}" - bin: "hasura-ndc-mongo" + bin: "hasura-mongodb" files: - - from: "./hasura-mongodb-aarch64-apple-darwin" - to: "hasura-ndc-mongo" + - from: "./mongodb-cli-plugin-aarch64-apple-darwin" + to: "hasura-mongodb" - selector: linux-arm64 - uri: "https://github.com/hasura/ndc-mongo/releases/download/${VERSION}/hasura-mongodb-aarch64-unknown-linux-gnu" + uri: "https://github.com/hasura/ndc-mongodb/releases/download/${VERSION}/mongodb-cli-plugin-aarch64-unknown-linux-gnu" sha256: "${LINUX_ARM64_SHA256}" - bin: "hasura-ndc-mongo" + bin: "hasura-mongodb" files: - - from: "./hasura-mongodb-aarch64-unknown-linux-gnu" - to: "hasura-ndc-mongo" + - from: "./mongodb-cli-plugin-aarch64-unknown-linux-gnu" + to: "hasura-mongodb" - selector: darwin-amd64 - uri: "https://github.com/hasura/ndc-mongo/releases/download/${VERSION}/hasura-mongodb-x86_64-apple-darwin" + uri: "https://github.com/hasura/ndc-mongodb/releases/download/${VERSION}/mongodb-cli-plugin-x86_64-apple-darwin" sha256: "${MACOS_AMD64_SHA256}" - bin: "hasura-ndc-mongo" + bin: "hasura-mongodb" files: - - from: "./hasura-mongodb-x86_64-apple-darwin" - to: "hasura-ndc-mongo" + - from: "./mongodb-cli-plugin-x86_64-apple-darwin" + to: "hasura-mongodb" - selector: windows-amd64 - uri: "https://github.com/hasura/ndc-mongo/releases/download/${VERSION}/hasura-mongodb-x86_64-pc-windows-msvc.exe" + uri: "https://github.com/hasura/ndc-mongodb/releases/download/${VERSION}/mongodb-cli-plugin-x86_64-pc-windows-msvc.exe" sha256: "${WINDOWS_AMD64_SHA256}" - bin: "hasura-ndc-mongo.exe" + bin: "hasura-mongodb.exe" files: - - from: "./hasura-mongodb-x86_64-pc-windows-msvc.exe" - to: "hasura-ndc-mongo.exe" + - from: "./mongodb-cli-plugin-x86_64-pc-windows-msvc.exe" + to: "hasura-mongodb.exe" - selector: linux-amd64 - uri: "https://github.com/hasura/ndc-mongo/releases/download/${VERSION}/hasura-mongodb-x86_64-unknown-linux-gnu" + uri: "https://github.com/hasura/ndc-mongodb/releases/download/${VERSION}/mongodb-cli-plugin-x86_64-unknown-linux-gnu" sha256: "${LINUX_AMD64_SHA256}" - bin: "hasura-ndc-mongo" + bin: "hasura-mongodb" files: - - from: "./hasura-mongodb-x86_64-unknown-linux-gnu" - to: "hasura-ndc-mongo" \ No newline at end of file + - from: "./mongodb-cli-plugin-x86_64-unknown-linux-gnu" + to: "hasura-mongodb" \ No newline at end of file