-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
47df0c0
commit 33fe31c
Showing
36 changed files
with
177 additions
and
171 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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
#!/bin/bash | ||
|
||
INSTANCE_ID=$( | ||
aws ec2 describe-instances \ | ||
--filters "Name=tag:Name,Values=Bastion Host" "Name=instance-state-name,Values=running" \ | ||
--query "Reservations[0].Instances[0].InstanceId" \ | ||
--region eu-west-1 \ | ||
--output text | ||
aws ec2 describe-instances \ | ||
--filters "Name=tag:Name,Values=Bastion Host" "Name=instance-state-name,Values=running" \ | ||
--query "Reservations[0].Instances[0].InstanceId" \ | ||
--region eu-west-1 \ | ||
--output text | ||
) | ||
|
||
echo "Starting port forwarding session with instance $INSTANCE_ID for profile $AWS_PROFILE" | ||
|
||
aws ssm start-session \ | ||
--target "$INSTANCE_ID" \ | ||
--document-name AWS-StartPortForwardingSession \ | ||
--parameters '{"portNumber":["8081"],"localPortNumber":["5050"]}' \ | ||
--region eu-west-1 | ||
--target "$INSTANCE_ID" \ | ||
--document-name AWS-StartPortForwardingSession \ | ||
--parameters '{"portNumber":["8081"],"localPortNumber":["5050"]}' \ | ||
--region eu-west-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
#!/usr/bin/env bash | ||
|
||
APP="$0" | ||
APPDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
APPDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
||
usage() { | ||
echo "Usage: $APP language type [ > template.js ]" | ||
echo -e "\tlanguage: is|en|..." | ||
echo -e "\ttype: slim|full" | ||
echo "Usage: $APP language type [ > template.js ]" | ||
echo -e "\tlanguage: is|en|..." | ||
echo -e "\ttype: slim|full" | ||
} | ||
|
||
if [ "$1" == "" ]; then | ||
echo "Error: missing language" | ||
usage | ||
exit 1 | ||
echo "Error: missing language" | ||
usage | ||
exit 1 | ||
fi | ||
|
||
if [[ "$2" != "slim" ]] && [[ "$2" != "full" ]]; then | ||
echo "Error: wrong type: $2" | ||
usage | ||
exit 1 | ||
echo "Error: wrong type: $2" | ||
usage | ||
exit 1 | ||
fi | ||
|
||
TEMPLATE="$APPDIR/../config/template-is.json" | ||
|
||
if [ ! -f "$TEMPLATE" ]; then | ||
echo "Error: could not find template file: '$TEMPLATE'" | ||
exit 1 | ||
echo "Error: could not find template file: '$TEMPLATE'" | ||
exit 1 | ||
fi | ||
|
||
JQ="$(which jq)" | ||
if [ ! -x "$JQ" ]; then | ||
echo "Error: could not find 'jq'. Please install" | ||
exit 1 | ||
echo "Error: could not find 'jq'. Please install" | ||
exit 1 | ||
fi | ||
|
||
replace_slim() { | ||
sed -E 's@"rules_path":.*?(,?\s*)$@"rules": []\1@' | \ | ||
sed -E 's@"stopwords_path":.*?(,?\s*)$@"stopwords": []\1@' | \ | ||
sed -E 's@"keywords_path":.*?(,?\s*)$@"keywords": []\1@' | \ | ||
sed -E 's@"synonyms_path":.*?(,?\s*)$@"synonyms": []\1@' | ||
sed -E 's@"rules_path":.*?(,?\s*)$@"rules": []\1@' | | ||
sed -E 's@"stopwords_path":.*?(,?\s*)$@"stopwords": []\1@' | | ||
sed -E 's@"keywords_path":.*?(,?\s*)$@"keywords": []\1@' | | ||
sed -E 's@"synonyms_path":.*?(,?\s*)$@"synonyms": []\1@' | ||
} | ||
|
||
replace_full() { | ||
sed -E 's@"rules_path":.*?(,?\s*)$@"rules_path": "analysis/stemmer.txt"\1@' | \ | ||
sed -E 's@"stopwords_path":.*?(,?\s*)$@"stopwords_path": "analysis/stopwords.txt"\1@' | \ | ||
sed -E 's@"keywords_path":.*?(,?\s*)$@"keywords_path": "analysis/keywords.txt"\1@' | \ | ||
sed -E 's@"synonyms_path":.*?(,?\s*)$@"synonyms_path": "analysis/synonyms.txt"\1@' | ||
sed -E 's@"rules_path":.*?(,?\s*)$@"rules_path": "analysis/stemmer.txt"\1@' | | ||
sed -E 's@"stopwords_path":.*?(,?\s*)$@"stopwords_path": "analysis/stopwords.txt"\1@' | | ||
sed -E 's@"keywords_path":.*?(,?\s*)$@"keywords_path": "analysis/keywords.txt"\1@' | | ||
sed -E 's@"synonyms_path":.*?(,?\s*)$@"synonyms_path": "analysis/synonyms.txt"\1@' | ||
} | ||
|
||
main() { | ||
# local lang="$1" | ||
local type="$2" | ||
local func="replace_$type" | ||
# local lang="$1" | ||
local type="$2" | ||
local func="replace_$type" | ||
|
||
jq '.settings, .mappings' < "$TEMPLATE" | $func | ||
jq '.settings, .mappings' <"$TEMPLATE" | $func | ||
|
||
} | ||
|
||
main "$1" "$2" | ||
main "$1" "$2" |
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
ROOT="$DIR/../.." | ||
export PATH=$ROOT/node_modules/.bin:$PATH | ||
|
||
case "$1" in | ||
"islandis" | "judicial-system" | "air-discount-scheme" | 'identity-server') | ||
ENVS=("dev" "staging" "prod") | ||
cd "$ROOT" | ||
for env in "${ENVS[@]}"; do | ||
node -r esbuild-register "$ROOT"/src/cli/cli render-env --chart="$1" --env="${env}" | diff "$ROOT"/../charts/"$1"/values."${env}".yaml - | ||
done | ||
;; | ||
*) | ||
echo "No diffing support for $1 yet or ever" | ||
;; | ||
"islandis" | "judicial-system" | "air-discount-scheme" | 'identity-server') | ||
ENVS=("dev" "staging" "prod") | ||
cd "$ROOT" | ||
for env in "${ENVS[@]}"; do | ||
node -r esbuild-register "$ROOT"/src/cli/cli render-env --chart="$1" --env="${env}" | diff "$ROOT"/../charts/"$1"/values."${env}".yaml - | ||
done | ||
;; | ||
*) | ||
echo "No diffing support for $1 yet or ever" | ||
;; | ||
esac |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
||
# shellcheck disable=SC1091 | ||
source "$DIR"/_common.sh | ||
|
||
yarn install --immutable | ||
yarn install --immutable |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
action=${1:-"check"} | ||
yarn nx format:"${action}" --all | ||
yarn nx format:"${action}" --all |
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 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
Oops, something went wrong.