forked from awslabs/amazon-ecs-intellisense-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.sh
executable file
·34 lines (25 loc) · 778 Bytes
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
SCHEMA_VERSION=$1
SDK_VERSION=$2
if [ -z $1 ]; then
echo "Error: Schema version is empty" && exit
fi
if [ -z $2 ]; then
echo "Error: SDK version is empty" && exit
fi
cd src/model
API_URL=https://raw.githubusercontent.com/aws/aws-sdk-go/master/models/apis/ecs/2014-11-13/api-2.json
DOCS_URL=https://raw.githubusercontent.com/aws/aws-sdk-go/master/models/apis/ecs/2014-11-13/docs-2.json
curl $API_URL > api.json
curl $DOCS_URL > docs.json
cd ..
(cat > version.py)<<EOF
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
See the most recent version number for AWS SDK Go here:
https://github.com/aws/aws-sdk-go/releases
"""
schema_version = '${SCHEMA_VERSION}'
sdk_go_version = '${SDK_VERSION}'
EOF