Skip to content

Commit

Permalink
add script for updating release env file, only read this in fastfile
Browse files Browse the repository at this point in the history
  • Loading branch information
brainbicycle committed Oct 6, 2023
1 parent 15b6dad commit a9ab974
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 0 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require 'fileutils'
require 'json'
require 'dotenv'

Dotenv.load('../.env.shared')
Dotenv.load('../.env.releases')

skip_docs
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"setup:artsy:update!": "scripts/update-env-for-artsy",
"setup:oss": "./scripts/setup-env-for-oss",
"setup:releases": "./scripts/setup-env-for-artsy && ./scripts/setup-env-for-releases && ./scripts/setup-distribute-macos",
"setup:releases:update!": "scripts/update-env-for-releases",
"start": "concurrently 'yarn relay:watch' 'react-native start'",
"start-storybook": "STORYBOOK=1 yarn start",
"start:reset-cache": "yarn start --reset-cache",
Expand Down
15 changes: 15 additions & 0 deletions scripts/update-env-for-releases
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euxo pipefail


read -p "Are you sure you want to update the env vars in S3? " -n 1 -r

if [[ $REPLY =~ ^[Yy]$ ]]
then
aws s3 cp .env.releases s3://artsy-citadel/eigen/.env.releases

RED='\033[0;31m'
RST='\033[0m'

printf "${RED}Don't forget to update on 1Password and CircleCI too!${RST}\n"
fi

0 comments on commit a9ab974

Please sign in to comment.