From 78803a454e1807317c2ab15d1c496abe5de0bcde Mon Sep 17 00:00:00 2001 From: Tanner Doshier Date: Wed, 13 Mar 2024 17:51:07 -0400 Subject: [PATCH] Switch scripts to /usr/bin/env --- bin/account-ids-by-name.sh | 2 +- bin/check-database-roles.sh | 2 +- bin/check-github-actions-auth.sh | 2 +- bin/configure-monitoring-secret.sh | 2 +- bin/create-or-update-database-roles.sh | 2 +- bin/create-tfbackend.sh | 2 +- bin/current-account-alias.sh | 2 +- bin/current-account-config-name.sh | 2 +- bin/current-account-id.sh | 2 +- bin/current-region.sh | 2 +- bin/deploy-release.sh | 2 +- bin/lint-markdown.sh | 2 +- bin/publish-release.sh | 2 +- bin/run-command.sh | 2 +- bin/run-database-migrations.sh | 2 +- bin/set-up-current-account.sh | 2 +- bin/terraform-apply.sh | 2 +- bin/terraform-init-and-apply.sh | 2 +- bin/terraform-init.sh | 2 +- template-only-bin/destroy-account.sh | 2 +- template-only-bin/destroy-app-build-repository.sh | 2 +- template-only-bin/destroy-app-service.sh | 2 +- template-only-bin/destroy-network.sh | 2 +- template-only-bin/download-and-install-template.sh | 2 +- template-only-bin/install-template.sh | 2 +- template-only-bin/set-up-project.sh | 2 +- template-only-bin/update-template.sh | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/bin/account-ids-by-name.sh b/bin/account-ids-by-name.sh index a12df150d..a79c3e662 100755 --- a/bin/account-ids-by-name.sh +++ b/bin/account-ids-by-name.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Prints a JSON dictionary that maps account names to account ids for the list # of accounts given by the terraform backend files of the form # ..s3.tfbackend in the infra/accounts directory. diff --git a/bin/check-database-roles.sh b/bin/check-database-roles.sh index fd1926176..fed12b08b 100755 --- a/bin/check-database-roles.sh +++ b/bin/check-database-roles.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Script that invokes the database role-manager AWS Lambda function to check # that the Postgres users were configured properly. diff --git a/bin/check-github-actions-auth.sh b/bin/check-github-actions-auth.sh index 2c5ec6953..3f0c1f5ae 100755 --- a/bin/check-github-actions-auth.sh +++ b/bin/check-github-actions-auth.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail GITHUB_ACTIONS_ROLE=$1 diff --git a/bin/configure-monitoring-secret.sh b/bin/configure-monitoring-secret.sh index b91a84f79..1ba00d27d 100755 --- a/bin/configure-monitoring-secret.sh +++ b/bin/configure-monitoring-secret.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # This script creates SSM parameter for storing integration URL for incident management # services. Script creates new SSM attribute or updates existing. diff --git a/bin/create-or-update-database-roles.sh b/bin/create-or-update-database-roles.sh index af98f25ab..99b9c4f46 100755 --- a/bin/create-or-update-database-roles.sh +++ b/bin/create-or-update-database-roles.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Script that invokes the database role-manager AWS Lambda function to create # or update the Postgres user roles for a particular environment. diff --git a/bin/create-tfbackend.sh b/bin/create-tfbackend.sh index b28877580..37fa46edc 100755 --- a/bin/create-tfbackend.sh +++ b/bin/create-tfbackend.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # This script creates a terraform backend config file for a terraform module. # It is not meant to be used directly. Instead, it is called by other scripts diff --git a/bin/current-account-alias.sh b/bin/current-account-alias.sh index f7003fc39..3d66b0faf 100755 --- a/bin/current-account-alias.sh +++ b/bin/current-account-alias.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Print the current AWS account alias set -euo pipefail echo -n "$(aws iam list-account-aliases --query "AccountAliases" --max-items 1 --output text)" diff --git a/bin/current-account-config-name.sh b/bin/current-account-config-name.sh index f7bd3b1c5..e187a7511 100755 --- a/bin/current-account-config-name.sh +++ b/bin/current-account-config-name.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Print the config name for the current AWS account # Do this by getting the current account and searching for a file in # infra/accounts that matches "..s3.tfbackend". diff --git a/bin/current-account-id.sh b/bin/current-account-id.sh index 92f368bf7..f9edf3634 100755 --- a/bin/current-account-id.sh +++ b/bin/current-account-id.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Print the current AWS account id set -euo pipefail echo -n "$(aws sts get-caller-identity --query "Account" --output text)" diff --git a/bin/current-region.sh b/bin/current-region.sh index c25b2c11d..4d6292635 100755 --- a/bin/current-region.sh +++ b/bin/current-region.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Print the current AWS region set -euo pipefail echo -n "$(aws configure list | grep region | awk '{print $2}')" diff --git a/bin/deploy-release.sh b/bin/deploy-release.sh index a5cf22197..4b112e8a0 100755 --- a/bin/deploy-release.sh +++ b/bin/deploy-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail APP_NAME=$1 diff --git a/bin/lint-markdown.sh b/bin/lint-markdown.sh index d70a06e39..4d6486bbe 100755 --- a/bin/lint-markdown.sh +++ b/bin/lint-markdown.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # To make things simpler, ensure we're in the repo's root directory (one directory up) before # running, regardless where the user is when invoking this script. diff --git a/bin/publish-release.sh b/bin/publish-release.sh index a835c12af..56021a32e 100755 --- a/bin/publish-release.sh +++ b/bin/publish-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/bin/run-command.sh b/bin/run-command.sh index 304ff505d..84b9b1c6c 100755 --- a/bin/run-command.sh +++ b/bin/run-command.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Run an application command using the application image # diff --git a/bin/run-database-migrations.sh b/bin/run-database-migrations.sh index 3c81ebcb9..c90d19b18 100755 --- a/bin/run-database-migrations.sh +++ b/bin/run-database-migrations.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Run database migrations # 1. Update the application's task definition with the latest build, but diff --git a/bin/set-up-current-account.sh b/bin/set-up-current-account.sh index b253c0fe9..6f5171e31 100755 --- a/bin/set-up-current-account.sh +++ b/bin/set-up-current-account.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # This script sets up the terraform backend for the AWS account that you are # currently authenticated into and creates the terraform backend config file. diff --git a/bin/terraform-apply.sh b/bin/terraform-apply.sh index dc6f8fc0c..4de1cb0c1 100755 --- a/bin/terraform-apply.sh +++ b/bin/terraform-apply.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Convenience script for running terraform apply for the specified module and configuration name. # The configuration name is used to determine which .tfvars file to use for the -var-file diff --git a/bin/terraform-init-and-apply.sh b/bin/terraform-init-and-apply.sh index 70896ceb9..5c574c3d2 100755 --- a/bin/terraform-init-and-apply.sh +++ b/bin/terraform-init-and-apply.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Convenience script for running terraform init followed by terraform apply # See ./bin/terraform-init.sh and ./bin/terraform-apply.sh for more details. diff --git a/bin/terraform-init.sh b/bin/terraform-init.sh index 7cc22fdfe..13626101e 100755 --- a/bin/terraform-init.sh +++ b/bin/terraform-init.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Convenience script for running terraform init for the specified module and configuration name. # The configuration name is used to determine which .tfbackend file to use for the -backend-config diff --git a/template-only-bin/destroy-account.sh b/template-only-bin/destroy-account.sh index f3e58e05c..25bb2b385 100755 --- a/template-only-bin/destroy-account.sh +++ b/template-only-bin/destroy-account.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Do not use this script on your project. This script is only used for testing # the platform bootstrap process. set -euxo pipefail diff --git a/template-only-bin/destroy-app-build-repository.sh b/template-only-bin/destroy-app-build-repository.sh index 72ef06e7b..afe3e9364 100755 --- a/template-only-bin/destroy-app-build-repository.sh +++ b/template-only-bin/destroy-app-build-repository.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Do not use this script on your project. This script is only used for testing # the platform bootstrap process. set -euxo pipefail diff --git a/template-only-bin/destroy-app-service.sh b/template-only-bin/destroy-app-service.sh index 8e3717285..2fb91d436 100755 --- a/template-only-bin/destroy-app-service.sh +++ b/template-only-bin/destroy-app-service.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Do not use this script on your project. This script is only used for testing # the platform bootstrap process. set -euxo pipefail diff --git a/template-only-bin/destroy-network.sh b/template-only-bin/destroy-network.sh index d2130c355..9d8071def 100755 --- a/template-only-bin/destroy-network.sh +++ b/template-only-bin/destroy-network.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Do not use this script on your project. This script is only used for testing # the platform bootstrap process. set -euxo pipefail diff --git a/template-only-bin/download-and-install-template.sh b/template-only-bin/download-and-install-template.sh index ce4c12fa6..ee893af04 100755 --- a/template-only-bin/download-and-install-template.sh +++ b/template-only-bin/download-and-install-template.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail echo "Fetch latest version of template-infra" diff --git a/template-only-bin/install-template.sh b/template-only-bin/install-template.sh index 69ba395c5..284bfcc03 100755 --- a/template-only-bin/install-template.sh +++ b/template-only-bin/install-template.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script installs the template-infra to your project. Run # This script from your project's root directory. diff --git a/template-only-bin/set-up-project.sh b/template-only-bin/set-up-project.sh index ec8859c06..8af351843 100755 --- a/template-only-bin/set-up-project.sh +++ b/template-only-bin/set-up-project.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail PROJECT_NAME=$1 diff --git a/template-only-bin/update-template.sh b/template-only-bin/update-template.sh index 2acf18b51..642fb8ce4 100755 --- a/template-only-bin/update-template.sh +++ b/template-only-bin/update-template.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # This script updates template-infra in your project. Run # This script from your project's root directory.