Skip to content

Commit

Permalink
implement changes to ensure mongo 7 compilation after latest official…
Browse files Browse the repository at this point in the history
… endpoint changes
  • Loading branch information
nachocodoner committed Feb 14, 2025
1 parent 67a84f1 commit bbebf34
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/mongodb-linux-x86_64-*
/mongodb-src-r*
/mongo-r*
/*.tgz
/*.tar.gz
18 changes: 12 additions & 6 deletions run-builder.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#!/bin/bash
set -e

MONGODB_VERSION='7.0.5'
SRC="mongodb-src-r$MONGODB_VERSION"
TARGET="mongodb-linux-x86_64-${MONGODB_VERSION}"
MONGO_VERSION='7.0.16'
SRC="r$MONGO_VERSION"
TARGET="mongodb-linux-x86_64-${MONGO_VERSION}"
BIN="$TARGET/bin"
mongoSrcUrl="https://github.com/mongodb/mongo/archive/refs/tags/$SRC.tar.gz"

mongoSrcFolder="mongo-$SRC"
[ ! -f "${SRC}.tar.gz" ] && curl -L -C - -O "$mongoSrcUrl"
[ ! -d $SRC ] && tar -xzf "${SRC}.tar.gz"
echo "{\"version\": \"${MONGO_VERSION}\"}" > $mongoSrcFolder/version.json

docker run --memory=58g --rm -it -v $(pwd)/$mongoSrcFolder:/mongodb mongodb-builder -e MONGO_VERSION="${MONGO_VERSION}"

[ ! -d $SRC ] && curl "https://fastdl.mongodb.org/src/$SRC.tar.gz" | tar -xz
docker run --memory=58g --rm -it -v $(pwd)/$SRC:/mongodb mongodb-builder
mkdir -p $BIN
sudo mv "$SRC/build/install/bin/mongos" "$SRC/build/install/bin/mongod" $BIN
sudo mv "$mongoSrcFolder/build/install/bin/mongos" "$mongoSrcFolder/build/install/bin/mongod" $BIN
sudo tar -czf "$TARGET.tgz" $TARGET

0 comments on commit bbebf34

Please sign in to comment.