Skip to content

Commit 671e927

Browse files
authored
CLOUDP-221977: New released Atlas Go SDK can't be used until several hours later (#1885)
1 parent 89bc12b commit 671e927

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

scripts/update-sdk.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
#!/usr/bin/env bash
22

3+
# Copyright 2024 MongoDB Inc
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
317
set -euo pipefail
418

5-
LATEST_SDK_RELEASE=$(curl -sSfL -X GET https://api.github.com/repos/mongodb/atlas-sdk-go/releases/latest | jq -r '.tag_name' | cut -d '.' -f 1)
6-
echo "==> Updating SDK to latest major version $LATEST_SDK_RELEASE"
7-
gomajor get "go.mongodb.org/atlas-sdk/$LATEST_SDK_RELEASE@latest"
19+
LATEST_SDK_TAG=$(curl -sSfL -X GET https://api.github.com/repos/mongodb/atlas-sdk-go/releases/latest | jq -r '.tag_name')
20+
21+
LATEST_SDK_RELEASE=$(echo "${LATEST_SDK_TAG}" | cut -d '.' -f 1)
22+
echo "==> Updating SDK to latest major version ${LATEST_SDK_TAG}"
23+
gomajor get "go.mongodb.org/atlas-sdk/${LATEST_SDK_RELEASE}@${LATEST_SDK_TAG}"
824
go mod tidy
9-
echo "Finished update"
25+
echo "Done"

0 commit comments

Comments
 (0)