-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into beta-releases
- Loading branch information
Showing
85 changed files
with
3,685 additions
and
2,420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
if [[ "${EVERGREEN_PROJECT}" != "10gen-compass-main" ]]; then | ||
echo "Trying to publish main compass (dev build) from ${EVERGREEN_PROJECT} project. Skipping..."; | ||
exit 0; | ||
fi | ||
|
||
if [[ "${EVERGREEN_BRANCH_NAME}" != "main" ]]; then | ||
echo "Trying to publish main compass (dev build) from ${EVERGREEN_BRANCH_NAME} branch. Skipping..."; | ||
exit 0; | ||
fi | ||
|
||
JSON_CONTENT=$( jq -n \ | ||
--arg id "$DEV_VERSION_IDENTIFIER" \ | ||
--arg key "${EVERGREEN_REVISION}_${EVERGREEN_REVISION_ORDER_ID}" \ | ||
'{version: $id, bucket_key_prefix: $key}' | ||
) | ||
|
||
URL="https://mciuploads.s3.amazonaws.com/${EVERGREEN_PROJECT}/compass/dev/$1" | ||
DATA=$(curl -sf "${URL}" || echo "$JSON_CONTENT") | ||
CURRENT_VERSION=$(echo "$DATA" | jq -r '.version') | ||
|
||
echo "Comparing versions: $CURRENT_VERSION and $DEV_VERSION_IDENTIFIER" | ||
LATEST_VERSION=$(npx semver "$CURRENT_VERSION" "$DEV_VERSION_IDENTIFIER" | tail -n1 | xargs) | ||
|
||
if [[ "$LATEST_VERSION" == "$CURRENT_VERSION" ]]; then | ||
echo "Skipping publishing dev release, version $DEV_VERSION_IDENTIFIER is not newer than $CURRENT_VERSION" | ||
exit 0 | ||
fi | ||
|
||
echo "$JSON_CONTENT" > "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,3 +87,4 @@ Alena Khineika <[email protected]> | |
Mingjun Yin <[email protected]> | ||
Ben Radcliffe <[email protected]> | ||
Betsy Button <[email protected]> | ||
Vivian Xiao <[email protected]> |
Oops, something went wrong.