-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add shell script to get file info json from figma api
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# this script is used in .travis.yml | ||
|
||
# this script is being made executable with | ||
# chmod ugo+x figma_extractor.sh | ||
|
||
# set flags for execution of this file: | ||
# -e: make sure command returns non-zero exit code as soon as somehting fails | ||
# set -e | ||
|
||
# During local development, we want to use the .env file. On CI, we | ||
# will pass these variables as options | ||
if [ -f .env ] | ||
then | ||
export $(cat .env | sed 's/#.*//g' | xargs) | ||
fi | ||
|
||
ACCESS_TOKEN=${FIGMA_ACCESS_TOKEN} | ||
FILE_URL=${FIGMA_FILE_URL} | ||
JSON_FILENAME=${FIGMA_JSON_FILENAME} | ||
|
||
curl -sH "X-Figma-Token: $FIGMA_ACCESS_TOKEN" "$FIGMA_FILE_URL" -o $FIGMA_JSON_FILENAME |