Allow the use of a local .env file to store username/project ID for UI scripts.

[?]
Dec 10, 2017, 5:34 AM
E7GQXOIDEENBMGLE3ZMKIVB4RUWL5H7YTR4E4DTX6V7HAVCBBRYAC

Dependencies

  • [2] JXG3FCXY Upgrade ps + halogen versions.
  • [3] UOG5H2TW Default work logging credit to logged-in user.
  • [4] 2G3GNDDU Event logging is now functioning in postgres.
  • [5] PBD7LZYQ Postgres & auth are beginning to function.
  • [6] XJ4EYMIH Let curl prompt for http password, rather than bash.
  • [7] SPJCFHXW Update shell scripts to point to https://aftok.com and prompt for input.
  • [8] PGZJ736C Update aftok.cfg.example and revise INSTALL instructions
  • [9] CDHZL3RP Add a couple of other CLI utilities for interacing with the service.
  • [10] KEP5WUFJ Convert project to stack-based build.
  • [11] G4BS4NND Add simple shell script demonstrating how to invite a companion.
  • [12] ZP62WC47 Begin conversion to build with stack.
  • [13] GKLIPHR5 Fix error in parsing of event metadata
  • [*] ADMKQQGC Initial empty Snap project.
  • [*] LEINLS3X Update deployment documentation.

Change contents

  • edit in .gitignore at line 6
    [4.33][2.1:13]()
    .stack-work
  • edit in .gitignore at line 25
    [16.14]
    .env
  • edit in scripts/create_project.sh at line 2
    [4.1254]
    [4.1254]
    if [ -f ".env" ]; then
    source .env
    fi
  • replacement in scripts/create_project.sh at line 7
    [4.1255][4.10:36]()
    read -p "Username: " USER
    [4.1255]
    [4.65]
    if [ -z "${USER}" ]; then
    read -p "Username: " USER
    echo
    fi
    read -p "Project Name: " PROJECT
  • replacement in scripts/create_project.sh at line 14
    [4.70][4.70:103]()
    read -p "Project Name: " PROJECT
    [4.70]
    [4.103]
    read -p "Undepreciated period (months): " UNDEPMON
    read -p "Depreciation duration (months): " DEPMON
    BODY=$(cat <<END_BODY
    {
    "projectName": "$PROJECT",
    "depf": {
    "type": "LinearDepreciation",
    "arguments": {
    "undep": $UNDEPMON,
    "dep": $DEPMON
    }
    }
    }
    END_BODY
    )
  • replacement in scripts/create_project.sh at line 33
    [3.341][3.341:385]()
    --data "{\"projectName\":\"$PROJECT\"}" \
    [3.341]
    [3.385]
    --data "$BODY" \
  • edit in scripts/invite.sh at line 2
    [4.14]
    [4.14]
    if [ -f ".env" ]; then
    source .env
    fi
    if [ -z "${USER}" ]; then
    read -p "Username: " USER
    echo
    fi
  • replacement in scripts/invite.sh at line 12
    [4.15][4.15:46](),[4.46][3.651:684]()
    read -p "Username: " USER
    echo
    read -p "Project UUID: " PROJECT
    [4.15]
    [4.77]
    if [ -z "${PID}" ]; then
    read -p "Project UUID: " PID
    echo
    fi
    read -p "Invite: " EMAIL
  • edit in scripts/invite.sh at line 19
    [4.82][4.82:107]()
    read -p "Invite: " EMAIL
  • replacement in scripts/list_projects.sh at line 3
    [4.15][4.15:41]()
    read -p "Username: " USER
    [4.15]
    [4.70]
    if [ -f ".env" ]; then
    source .env
    fi
    if [ -z "${USER}" ]; then
    read -p "Username: " USER
    echo
    fi
  • replacement in scripts/log.sh at line 3
    [4.190][4.190:216](),[4.245][4.245:283]()
    read -p "Username: " USER
    echo
    read -p "Project UUID: " PROJECT
    [4.190]
    [4.283]
    if [ -f ".env" ]; then
    source .env
    fi
    if [ -z "${USER}" ]; then
    read -p "Username: " USER
    echo
    fi
    if [ -z "${PID}" ]; then
    read -p "Project UUID: " PID
    echo
    fi
  • replacement in scripts/log_end.sh at line 3
    [4.437][4.437:463](),[4.492][4.492:497](),[4.497][3.1070:1103]()
    read -p "Username: " USER
    echo
    read -p "Project UUID: " PROJECT
    [4.437]
    [4.561]
    if [ -f ".env" ]; then
    source .env
    fi
    if [ -z "${USER}" ]; then
    read -p "Username: " USER
    echo
    fi
    if [ -z "${PID}" ]; then
    read -p "Project UUID: " PID
    echo
    fi
  • replacement in scripts/log_start.sh at line 3
    [4.678][4.678:704](),[4.733][4.733:738](),[4.738][3.1248:1277]()
    read -p "Username: " USER
    echo
    read -p "Project UUID: " PID
    [4.678]
    [4.802]
    if [ -f ".env" ]; then
    source .env
    fi
    if [ -z "${USER}" ]; then
    read -p "Username: " USER
    echo
    fi
    if [ -z "${PID}" ]; then
    read -p "Project UUID: " PID
    echo
    fi