Sha256: fe8bb4cd7eeb00402c881c61256e5431863736b88206f361a37641b51fdc8fcc

Contents?: true

Size: 1.13 KB

Versions: 9

Compression:

Stored size: 1.13 KB

Contents

#!/usr/bin/env bash

set -e

# Initialize flags
development=false
staging=false
production=false

# Check for and parse flags
for arg in "$@"
do
    case $arg in
        --development)
            development=true
        ;;
        --staging)
            staging=true
        ;;
        --production)
            production=true
        ;;
        *)
            # Unknown arguments can be ignored or handled here
        ;;
    esac
done

if [[ $development == true ]]; then
    RAILS_MASTER_KEY=$(op read "op://Plug-$HEPHAESTUS_CAPITAL_PLUG_NAME/Development Secrets/Common/RAILS_MASTER_KEY") bin/rails credentials:edit -e development
elif [[ $staging == true ]]; then
    RAILS_MASTER_KEY=$(op read "op://Plug-$HEPHAESTUS_CAPITAL_PLUG_NAME/Staging Secrets/Common/RAILS_MASTER_KEY") bin/rails credentials:edit -e staging
elif [[ $production == true ]]; then
    RAILS_MASTER_KEY=$(op read "op://Plug-$HEPHAESTUS_CAPITAL_PLUG_NAME/Production Secrets/Common/RAILS_MASTER_KEY") bin/rails credentials:edit -e production
else
    echo "Please specify a target environment with one of the following flags: --development, --staging, --production"
    exit 1
fi

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hephaestus-0.8.16.1 script/templates/edit-credentials
hephaestus-0.8.16 script/templates/edit-credentials
hephaestus-0.8.15.5 script/templates/edit-credentials
hephaestus-0.8.15.4 script/templates/edit-credentials
hephaestus-0.8.15.3 script/templates/edit-credentials
hephaestus-0.8.15.2 script/templates/edit-credentials
hephaestus-0.8.15.1 script/templates/edit-credentials
hephaestus-0.8.15 script/templates/edit-credentials
hephaestus-0.8.14 script/edit-credentials