Sha256: a1f6c749a5c245f06ec6181159bd141c323b0f18f0afcd874f818aa5638d6bf1

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 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-Email/Development Secrets/Common/RAILS_MASTER_KEY") bin/rails credentials:edit -e development
elif [[ $staging == true ]]; then
    RAILS_MASTER_KEY=$(op read "op://Plug-Email/Staging Secrets/Common/RAILS_MASTER_KEY") bin/rails credentials:edit -e staging
elif [[ $production == true ]]; then
    RAILS_MASTER_KEY=$(op read "op://Plug-Email/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

4 entries across 4 versions & 1 rubygems

Version Path
hephaestus-0.8.13 templates/script/edit-credentials
hephaestus-0.8.12.2 templates/script/edit-credentials
hephaestus-0.8.12.1 templates/script/edit-credentials
hephaestus-0.8.12 templates/script/edit-credentials