Skip to content

Commit

Permalink
made shell fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibola committed Sep 20, 2024
1 parent 8669547 commit a394a7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ functions:
- command: git.apply_patch
# Make an evergreen exapanstion file with dynamic values
- command: subprocess.exec
include_expansions_in_env: ["is_patch", "version_id", "project"]
params:
working_dir: "src"
binary: bash
Expand Down
28 changes: 16 additions & 12 deletions .evergreen/prepare-env-and-resources.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@

# PREPARE EVERGREEN ENVINROMENT
# Get the current unique version of this checkout
# shellcheck disable=SC2154
if [ "${is_patch}" = "true" ]; then
# shellcheck disable=SC2154
CURRENT_VERSION=$(git describe)-patch-${version_id}
else
CURRENT_VERSION=latest
fi

export DRIVERS_TOOLS="$(pwd)/../drivers-tools"
export PROJECT_DIRECTORY="$(pwd)"
DRIVERS_TOOLS="$(pwd)/../drivers-tools"
PROJECT_DIRECTORY="$(pwd)"

# Python has cygwin path problems on Windows. Detect prospective mongo-orchestration home directory
if [[ "$(uname -s)" == CYGWIN* ]]; then
export DRIVERS_TOOLS=$(cygpath -m $DRIVERS_TOOLS)
export PROJECT_DIRECTORY=$(cygpath -m $PROJECT_DIRECTORY)
DRIVERS_TOOLS=$(cygpath -m $DRIVERS_TOOLS)
PROJECT_DIRECTORY=$(cygpath -m $PROJECT_DIRECTORY)
fi

export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
export PROJECT_ORCHESTRATION_HOME="$PROJECT_DIRECTORY/.evergreen/orchestration"
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
export UPLOAD_BUCKET="${project}"
MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
PROJECT_ORCHESTRATION_HOME="$PROJECT_DIRECTORY/.evergreen/orchestration"
MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
# shellcheck disable=SC2154
UPLOAD_BUCKET="${project}"

cat <<EOT >expansion.yml
CURRENT_VERSION: "$CURRENT_VERSION"
Expand All @@ -46,11 +49,12 @@ EOT
cat expansion.yml

# PREPARE RESOURCES
rm -rf ${DRIVERS_TOOLS}
rm -rf $DRIVERS_TOOLS
if [ "${project}" = "drivers-tools" ]; then
# If this was a patch build, doing a fresh clone would not actually test the patch
cp -R ${PROJECT_DIRECTORY}/ ${DRIVERS_TOOLS}
cp -R $PROJECT_DIRECTORY/ $DRIVERS_TOOLS
else
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git ${DRIVERS_TOOLS}
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
fi
${DRIVERS_TOOLS}/.evergreen/setup.sh

$DRIVERS_TOOLS/.evergreen/setup.sh

0 comments on commit a394a7d

Please sign in to comment.