Skip to content

Commit 2c068e3

Browse files
committed
split mongo scripts
1 parent 2b89ce9 commit 2c068e3

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

Diff for: run-mongo.sh renamed to _run-mongo.sh

File renamed without changes.

Diff for: env-mongo.sh

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
set -euo pipefail
44

5-
MONGO_VERSION=6
65
CONTAINER_NAME=mb-mongo-db
76
HOST_PORT=27017
87

Diff for: run-mongo-latest.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
SOURCE_DIR=`dirname "${BASH_SOURCE[0]}"`
4+
5+
MONGO_VERSION=latest $SOURCE_DIR/_run-mongo.sh

Diff for: run-mongo-oldest.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
SOURCE_DIR=`dirname "${BASH_SOURCE[0]}"`
4+
5+
MONGO_VERSION=$(curl -s --request GET --url https://endoflife.date/api/mongodb.json |
6+
jq -r --arg today $(date +%Y%m%d) 'map(select((.eol == false) or ((.eol | gsub("-";"") | tonumber) > ($today | tonumber)))) | min_by(.cycle) | .cycle')
7+
8+
MONGO_VERSION=$MONGO_VERSION $SOURCE_DIR/_run-mongo.sh

0 commit comments

Comments
 (0)