From b03967e6fa545e55aac2239d8618777443a9856f Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Thu, 21 Jan 2021 13:35:40 +0100 Subject: [PATCH 1/2] chore(docs): fix typo (ny -> by) --- gh-pages/content/specification/2-type-system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gh-pages/content/specification/2-type-system.md b/gh-pages/content/specification/2-type-system.md index f00d871516..4a2a546c19 100644 --- a/gh-pages/content/specification/2-type-system.md +++ b/gh-pages/content/specification/2-type-system.md @@ -360,7 +360,7 @@ using that. By default, _submodule_ names are rendered appropriately in the target language (this typically involves adjusting the case of _submodule_ name fragments to the idiomatic form in the language). In certain cases however, a developer can choose to use a different configuration by defining the _submodule_ using the namespaced-export syntax -(`export * as namespace from './module-name';`) ny placing a `.jsiirc.json` file next to the entry point of the +(`export * as namespace from './module-name';`) by placing a `.jsiirc.json` file next to the entry point of the namespaced module. For example, if `./module-name`'s entry point is `foo/bar/module-name/index.ts`, the _submodule_ configuration resides in `foo/bar/module-name/.jsiirc.json`. From e15984cb98001a200b0afc9a0bf020b767b6b53c Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Thu, 21 Jan 2021 14:06:41 +0000 Subject: [PATCH 2/2] chore: remove unused strong-named signing build infrastructure (#2458) The buildspec currently contains a prebuild step which fetches a key for strong-named signing; however, signing has been disabled for at least six months (see #1770). Removing the unused code to faciliate cleaning up our infrastructure a bit. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 --- buildspec.yaml | 3 -- package.json | 1 - scripts/fetch-dotnet-snk.sh | 58 ------------------------------------- 3 files changed, 62 deletions(-) delete mode 100644 scripts/fetch-dotnet-snk.sh diff --git a/buildspec.yaml b/buildspec.yaml index 53a77826f2..00fbd9c063 100644 --- a/buildspec.yaml +++ b/buildspec.yaml @@ -6,9 +6,6 @@ phases: # Temporarily - install yarn if it's not there already - yarn --version || npm install --global yarn - yarn install --frozen-lockfile - pre_build: - commands: - - yarn fetch-dotnet-snk build: commands: - yarn build && yarn test diff --git a/package.json b/package.json index cfa44b0d93..853304a7f4 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "lint:fix": "lerna run lint:fix --stream --sort", "bump": "bash scripts/bump.sh", "dist-clean": "lerna run dist-clean --stream && rm -rf dist", - "fetch-dotnet-snk": "bash scripts/fetch-dotnet-snk.sh", "package": "bash scripts/package.sh", "test": "lerna run test --concurrency=1 --stream", "test:integ": "lerna run test:integ --stream", diff --git a/scripts/fetch-dotnet-snk.sh b/scripts/fetch-dotnet-snk.sh deleted file mode 100644 index 7c22c6b466..0000000000 --- a/scripts/fetch-dotnet-snk.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -set -euo pipefail - -# This script retrieves the .snk file needed to create strong names for .NET assemblies. - -function echo_usage() { - echo "USAGE: Set the following environment variables, then run ./fetch-dotnet-snk.sh with no arguments." - echo -e "\tDOTNET_STRONG_NAME_ENABLED=true" - echo -e "\tDOTNET_STRONG_NAME_ROLE_ARN=" - echo -e "\tDOTNET_STRONG_NAME_SECRET_REGION=" - echo -e "\tDOTNET_STRONG_NAME_SECRET_ID=" -} - -if [ -z "${DOTNET_STRONG_NAME_ENABLED:-}" ]; then - echo "Environment variable DOTNET_STRONG_NAME_ENABLED is not set. Skipping strong-name signing." - exit 0 -fi - -# TODO: FIXME LATER -echo "!!! STRONG NAME SIGNING TEMPORARILY DISABLED !!!" -exit 0 -# END OF TODO - -echo "Retrieving SNK..." - -if [ -z "${DOTNET_STRONG_NAME_ROLE_ARN:-}" ]; then - echo "Strong name signing is enabled, but DOTNET_STRONG_NAME_ROLE_ARN is not set." - echo_usage - exit 1 -fi - -if [ -z "${DOTNET_STRONG_NAME_SECRET_REGION:-}" ]; then - echo "Strong name signing is enabled, but DOTNET_STRONG_NAME_SECRET_REGION is not set." - echo_usage - exit 1 -fi - -if [ -z "${DOTNET_STRONG_NAME_SECRET_ID:-}" ]; then - echo "Strong name signing is enabled, but DOTNET_STRONG_NAME_SECRET_ID is not set." - echo_usage - exit 1 -fi - -ROLE=$(aws sts assume-role --region ${DOTNET_STRONG_NAME_SECRET_REGION:-} --role-arn ${DOTNET_STRONG_NAME_ROLE_ARN:-} --role-session-name "jsii-dotnet-snk") -export AWS_ACCESS_KEY_ID=$(node -p "(${ROLE}).Credentials.AccessKeyId") -export AWS_SECRET_ACCESS_KEY=$(node -p "(${ROLE}).Credentials.SecretAccessKey") -export AWS_SESSION_TOKEN=$(node -p "(${ROLE}).Credentials.SessionToken") - -SNK_SECRET=$(aws secretsmanager get-secret-value --region ${DOTNET_STRONG_NAME_SECRET_REGION:-} --secret-id ${DOTNET_STRONG_NAME_SECRET_ID:-}) -TMP_DIR=$(mktemp -d) -TMP_KEY="$TMP_DIR/key.snk" -node -p "(${SNK_SECRET}).SecretBinary" | base64 --decode > $TMP_KEY - -cp $TMP_KEY packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers/key.snk -cp $TMP_KEY packages/@jsii/dotnet-runtime/src/Amazon.JSII.JsonModel/key.snk -cp $TMP_KEY packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/key.snk - -rm -rf $TMP_DIR