Skip to content

Commit 3e17939

Browse files
committed
Resolve merge conflicts
2 parents ecf61c5 + 368fd15 commit 3e17939

File tree

4 files changed

+95
-39
lines changed

4 files changed

+95
-39
lines changed

scripts/create_documentation_pr.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
3+
# Unless explicitly stated otherwise all files in this repository are licensed
4+
# under the Apache License Version 2.0.
5+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
6+
# Copyright 2019 Datadog, Inc.
7+
8+
# This script automatically opens a PR to the Documentation repo for lambda layer deploys
9+
10+
GREEN="\033[0;32m"
11+
NC="\033[0;0m"
12+
DOCUMENTATION_REPO_PATH=$HOME/go/src/github.com/DataDog/documentation
13+
DOCUMENTATION_FILE=./layouts/shortcodes/latest-lambda-layer-version.html
14+
15+
function print_color {
16+
printf "$GREEN$1$NC\n"
17+
}
18+
19+
print_color "Creating a Github PR to update documentation"
20+
21+
if [ ! -d $DOCUMENTATION_REPO_PATH ]; then
22+
print_color "Documentation directory does not exist, cloning into $DOCUMENTATION_REPO_PATH"
23+
git clone [email protected]:DataDog/documentation $DOCUMENTATION_REPO_PATH
24+
fi
25+
26+
cd $DOCUMENTATION_REPO_PATH
27+
28+
# Make sure they don't have any local changes
29+
if [ ! -z "$(git status --porcelain)" ]; then
30+
print_color "Documentation directory is dirty -- please stash or save your changes and manually create the PR"
31+
exit 1
32+
fi
33+
34+
print_color "Pulling latest changes from Github"
35+
git checkout master
36+
git pull
37+
38+
print_color "Checking out new branch that has version changes"
39+
git checkout -b $USER/bump-nodejs-layer-version-$VERSION
40+
sed -i '' -e '/.*"node"/{' -e 'n;s/.*/ '"$VERSION"'/' -e '}' $DOCUMENTATION_FILE
41+
git add $DOCUMENTATION_FILE
42+
43+
print_color "Creating commit -- please tap your Yubikey if prompted"
44+
git commit -m "Bump $LAYER layer to version $VERSION"
45+
git push --set-upstream origin $USER/bump-nodejs-layer-version-$VERSION
46+
dd-pr
47+
48+
# Reset documentation repo to clean a state that's tracking master
49+
print_color "Resetting documentation git branch to master"
50+
git checkout -B master origin/master

scripts/publish_prod.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,6 @@ git push origin "refs/tags/v$NEW_VERSION"
8989
echo
9090
echo "Now create a new release with the tag v${NEW_VERSION} created"
9191
echo "https://github.com/DataDog/datadog-lambda-js/releases/new?tag=v$NEW_VERSION&title=v$NEW_VERSION"
92-
echo "Also, remember to update ${HOME}/go/src/github.com/datadog/documentation/layouts/shortcodes/latest-lambda-layer-version.html"
92+
93+
# Open a PR to the documentation repo to automatically bump layer version
94+
VERSION=$VERSION LAYER=datadog-lambda-js ./scripts/create_documentation_pr.sh

scripts/publish_sandbox.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Usage: VERSION=5 aws-vault exec sandbox-acccount-admin -- publish_sandbox.sh
3+
# Usage: VERSION=5 aws-vault exec sandbox-account-admin -- publish_sandbox.sh
44
set -e
55

66
if [ -z "$VERSION" ]; then
@@ -12,3 +12,7 @@ fi
1212
./scripts/build_layers.sh
1313
./scripts/sign_layers.sh sandbox
1414
VERSION=$VERSION REGIONS=sa-east-1 ./scripts/publish_layers.sh
15+
16+
# Automatically create PR against github.com/DataDog/documentation
17+
# If you'd like to test, please uncomment the below line
18+
# VERSION=$VERSION LAYER=datadog-lambda-js ./scripts/create_documentation_pr.sh

yarn.lock

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# yarn lockfile v1
33

44

5-
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5":
6-
version "7.14.5"
7-
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb"
8-
integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==
5+
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.15.8":
6+
version "7.15.8"
7+
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503"
8+
integrity sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==
99
dependencies:
1010
"@babel/highlight" "^7.14.5"
1111

@@ -15,32 +15,32 @@
1515
integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==
1616

1717
"@babel/core@^7.1.0", "@babel/core@^7.7.2", "@babel/core@^7.7.5":
18-
version "7.15.5"
19-
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.5.tgz#f8ed9ace730722544609f90c9bb49162dc3bf5b9"
20-
integrity sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==
18+
version "7.15.8"
19+
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.8.tgz#195b9f2bffe995d2c6c159e72fe525b4114e8c10"
20+
integrity sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og==
2121
dependencies:
22-
"@babel/code-frame" "^7.14.5"
23-
"@babel/generator" "^7.15.4"
22+
"@babel/code-frame" "^7.15.8"
23+
"@babel/generator" "^7.15.8"
2424
"@babel/helper-compilation-targets" "^7.15.4"
25-
"@babel/helper-module-transforms" "^7.15.4"
25+
"@babel/helper-module-transforms" "^7.15.8"
2626
"@babel/helpers" "^7.15.4"
27-
"@babel/parser" "^7.15.5"
27+
"@babel/parser" "^7.15.8"
2828
"@babel/template" "^7.15.4"
2929
"@babel/traverse" "^7.15.4"
30-
"@babel/types" "^7.15.4"
30+
"@babel/types" "^7.15.6"
3131
convert-source-map "^1.7.0"
3232
debug "^4.1.0"
3333
gensync "^1.0.0-beta.2"
3434
json5 "^2.1.2"
3535
semver "^6.3.0"
3636
source-map "^0.5.0"
3737

38-
"@babel/generator@^7.15.4", "@babel/generator@^7.7.2":
39-
version "7.15.4"
40-
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.4.tgz#85acb159a267ca6324f9793986991ee2022a05b0"
41-
integrity sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==
38+
"@babel/generator@^7.15.4", "@babel/generator@^7.15.8", "@babel/generator@^7.7.2":
39+
version "7.15.8"
40+
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.8.tgz#fa56be6b596952ceb231048cf84ee499a19c0cd1"
41+
integrity sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==
4242
dependencies:
43-
"@babel/types" "^7.15.4"
43+
"@babel/types" "^7.15.6"
4444
jsesc "^2.5.1"
4545
source-map "^0.5.0"
4646

@@ -91,10 +91,10 @@
9191
dependencies:
9292
"@babel/types" "^7.15.4"
9393

94-
"@babel/helper-module-transforms@^7.15.4":
95-
version "7.15.7"
96-
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz#7da80c8cbc1f02655d83f8b79d25866afe50d226"
97-
integrity sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw==
94+
"@babel/helper-module-transforms@^7.15.8":
95+
version "7.15.8"
96+
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz#d8c0e75a87a52e374a8f25f855174786a09498b2"
97+
integrity sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg==
9898
dependencies:
9999
"@babel/helper-module-imports" "^7.15.4"
100100
"@babel/helper-replace-supers" "^7.15.4"
@@ -169,10 +169,10 @@
169169
chalk "^2.0.0"
170170
js-tokens "^4.0.0"
171171

172-
"@babel/parser@^7.1.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.5", "@babel/parser@^7.7.2":
173-
version "7.15.7"
174-
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.7.tgz#0c3ed4a2eb07b165dfa85b3cc45c727334c4edae"
175-
integrity sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==
172+
"@babel/parser@^7.1.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.8", "@babel/parser@^7.7.2":
173+
version "7.15.8"
174+
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016"
175+
integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==
176176

177177
"@babel/plugin-syntax-async-generators@^7.8.4":
178178
version "7.8.4"
@@ -832,9 +832,9 @@ atob@^2.1.2:
832832
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
833833

834834
aws-sdk@*:
835-
version "2.1001.0"
836-
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1001.0.tgz#c4da256aa0058438ba611ae06fa850f4f7d63abc"
837-
integrity sha512-DpmslPU8myCaaRUwMzB/SqAMtD2zQckxYwq3CguIv8BI+JHxDLeTdPCLfA5jffQ8k6dcvISOuiqdpwCZucU0BA==
835+
version "2.1003.0"
836+
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1003.0.tgz#f4ca218f466c524a90370b5604a3ad4cda4c0e08"
837+
integrity sha512-UEZveI1m7+/YsomU2tVxLMmlo5g3sr3ue+QMJ2UwbrvHZ+O9hr9vVia1lD+L8fYTQenOff95NFc02h3pDE3iDA==
838838
dependencies:
839839
buffer "4.9.2"
840840
events "1.1.1"
@@ -1276,9 +1276,9 @@ [email protected]:
12761276
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
12771277

12781278
electron-to-chromium@^1.3.857:
1279-
version "1.3.860"
1280-
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.860.tgz#d612e54ed75fa524c12af8da3ad8121ebfe2802b"
1281-
integrity sha512-gWwGZ+Wv4Mou2SJRH6JQzhTPjL5f95SX7n6VkLTQ/Q/INsZLZNQ1vH2GlZjozKyvT0kkFuCmWTwIoCj+/hUDPw==
1279+
version "1.3.862"
1280+
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.862.tgz#c1c5d4382449e2c9b0e67fe1652f4fc451d6d8c0"
1281+
integrity sha512-o+FMbCD+hAUJ9S8bfz/FaqA0gE8OpCCm58KhhGogOEqiA1BLFSoVYLi+tW+S/ZavnqBn++n0XZm7HQiBVPs8Jg==
12821282

12831283
emittery@^0.8.1:
12841284
version "0.8.1"
@@ -1671,9 +1671,9 @@ istanbul-lib-source-maps@^4.0.0:
16711671
source-map "^0.6.1"
16721672

16731673
istanbul-reports@^3.0.2:
1674-
version "3.0.2"
1675-
resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b"
1676-
integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==
1674+
version "3.0.3"
1675+
resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.3.tgz#974d682037f6d12b15dc55f9a2a5f8f1ea923831"
1676+
integrity sha512-0i77ZFLsb9U3DHi22WzmIngVzfoyxxbQcZRqlF3KoKmCJGq9nhFHoGi8FqBztN2rE8w6hURnZghetn0xpkVb6A==
16771677
dependencies:
16781678
html-escaper "^2.0.0"
16791679
istanbul-lib-report "^3.0.0"
@@ -2588,9 +2588,9 @@ promise-retry@^2.0.1:
25882588
retry "^0.12.0"
25892589

25902590
prompts@^2.0.1:
2591-
version "2.4.1"
2592-
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61"
2593-
integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==
2591+
version "2.4.2"
2592+
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
2593+
integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==
25942594
dependencies:
25952595
kleur "^3.0.3"
25962596
sisteransi "^1.0.5"

0 commit comments

Comments
 (0)