Skip to content

Instantly share code, notes, and snippets.

@ethagnawl
Created December 18, 2018 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethagnawl/52041812383f9372f551843a762f0f6e to your computer and use it in GitHub Desktop.
Save ethagnawl/52041812383f9372f551843a762f0f6e to your computer and use it in GitHub Desktop.
pull data from airtable
#!/usr/bin/env bash
set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
echo "DIR: $DIR"
SRC="$DIR/../src/program.js"
DEST="$DIR/../build/data-$BUILD_ID.js"
echo "SRC: $SRC"
echo "DEST: $DEST"
AIRTABLE_ENDPOINT="https://api.airtable.com/v0/$AIRTABLE_BASE_ID/$AIRTABLE_TABLE_ID?maxRecords=$AIRTABLE_RECORD_COUNT"
curl $AIRTABLE_ENDPOINT -H "Accept: application/json" -H "Authorization: Bearer $AIRTABLE_API_KEY" > $DEST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment