Skip to content

Commit

Permalink
netlify.toml: Verify pre-fetched files exist
Browse files Browse the repository at this point in the history
Closes #140
  • Loading branch information
li-boxuan authored and gitmate-bot committed Aug 3, 2018
1 parent 3638063 commit 10003d0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
3 changes: 3 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
publish = "."
command = "script/build.sh && script/verify-files.sh"
12 changes: 1 addition & 11 deletions script/run-test.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
#!/bin/bash
set -e -x

# Verify files exist
files=( "issues.json" "recent-issues.json" )
for file in "${files[@]}"
do
if [[ -f "$file" ]]; then
echo "File $file exists."
else
echo "File $file does not exist."
exit 1
fi
done
script/verify-files.sh

$(npm bin)/jest
14 changes: 14 additions & 0 deletions script/verify-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e -x

# Verify files exist
files=( "issues.json" "recent-issues.json" )
for file in "${files[@]}"
do
if [[ -f "$file" ]]; then
echo "File $file exists."
else
echo "File $file does not exist."
exit 1
fi
done

0 comments on commit 10003d0

Please sign in to comment.