From 7578307ce869fa2d126bd1b359f113aca9cd6aa8 Mon Sep 17 00:00:00 2001 From: Arun Mishra <68141066+arun-mi@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:26:49 +0530 Subject: [PATCH] feat: HS-169: AWS Prod Deployment Script (#55) Co-authored-by: arun.mishra --- Hyperswitch-React-Demo-App/package.json | 3 +- ...perswitch_web_aws_production_deployment.sh | 100 ++++++++++++++++++ package.json | 1 + webpack.common.js | 4 +- 4 files changed, 104 insertions(+), 4 deletions(-) create mode 100755 aws/hyperswitch_web_aws_production_deployment.sh diff --git a/Hyperswitch-React-Demo-App/package.json b/Hyperswitch-React-Demo-App/package.json index ec653eb43..d6369e0e9 100644 --- a/Hyperswitch-React-Demo-App/package.json +++ b/Hyperswitch-React-Demo-App/package.json @@ -29,8 +29,7 @@ "build": "webpack --config webpack.common.js", "test": "react-scripts test", "eject": "react-scripts eject", - "format": "prettier --write \"**/*.{js,jsx}\"", - "postinstall": "patch-package" + "format": "prettier --write \"**/*.{js,jsx}\"" }, "eslintConfig": { "extends": [ diff --git a/aws/hyperswitch_web_aws_production_deployment.sh b/aws/hyperswitch_web_aws_production_deployment.sh new file mode 100755 index 000000000..e2ca477a4 --- /dev/null +++ b/aws/hyperswitch_web_aws_production_deployment.sh @@ -0,0 +1,100 @@ +#!/bin/bash + +command_discovery() { + type $1 >/dev/null 2>/dev/null + if [[ $? != 0 ]]; then + echo "\`$1\` command not found" + exit 1 + fi +} + +command_discovery curl +command_discovery aws + +echo "Installing Node Modules" + +echo $( (npm install --force)) +echo $( (npm run re:build)) + +echo "Starting AWS S3 Configurations" +echo "Please enter your AWS Region" +read AWS_REGION