Skip to content

Commit

Permalink
Add public github pages site check to preview script (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
themadcreator authored and giladgray committed Nov 10, 2016
1 parent 14bbbbc commit ef241a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ general:
- packages/docs/dist
- packages/landing/dist
- packages/table/preview
- docs
machine:
node:
version: 6.1.0
Expand Down
17 changes: 17 additions & 0 deletions scripts/preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,22 @@ else
PREVIEWS="$PREVIEWS | $(artifactLink '/packages/table/preview/index.html' 'table')"
fi

# Actual public site
echo -n "Full site preview..."
git rev-parse --abbrev-ref HEAD | grep -q -e '^release/'
if [ $? -eq 0 ]; then
git diff HEAD..origin/master --quiet -- docs
if [ $? -eq 0 ]; then
echo "ERROR"
echo "New release detected, but docs were not updated."
exit 1
else
echo "DONE"
PREVIEWS="$PREVIEWS | $(artifactLink '/docs/index.html' 'github pages')"
fi
else
echo "SKIP"
fi

# Submit comment
submitPreviewComment "<h3>${COMMIT_MESSAGE}</h3>\nPreview: <b>${PREVIEWS}</b>\nCoverage: ${COVERAGES}"

1 comment on commit ef241a4

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add public github pages site check to preview script (#73)

Preview: docs Coverage: core | datetime

Please sign in to comment.