Skip to content

Commit

Permalink
Update cli to check for ignore file before running
Browse files Browse the repository at this point in the history
  • Loading branch information
kitop committed Oct 12, 2019
1 parent 645ae73 commit b56d0f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/sh -l

sh -c "if grep \"^ignore:$BUILD_DIR\" $HOME/ignore; then ls $HOME && exit 0; else ${BUILD_COMMAND:-echo} && netlify $*; fi"
if [ -f "$HOME/ignore" ] && grep "^ignore:$BUILD_DIR" "$HOME/ignore"; then
echo "$BUILD_DIR didn't change"
else
${BUILD_COMMAND:-echo} && netlify $*
fi

2 comments on commit b56d0f2

@antoniosb
Copy link

Choose a reason for hiding this comment

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

Without the sh -c it's not possible to chain pipes or redirect the command output to external files. 😖

Is it the intented behavior ?

@Triloworld
Copy link

Choose a reason for hiding this comment

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

No "actions.yml" and no "sh -c" is hard stop. No preview for subdomain from CLI command (other way isn't right now provided)

Please sign in to comment.