Simon Bruder
d83864234e
All checks were successful
continuous-integration/drone/push Build is passing
26 lines
530 B
Bash
Executable file
26 lines
530 B
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
if ! [ -e ".netlify/state.json" ]; then
|
|
echo "“.netlify/state.json” is missing, create it in your repository with “netlify deploy”"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$PLUGIN_DIR" ]; then
|
|
echo "Please specify “dir”"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$PLUGIN_AUTH_TOKEN" ]; then
|
|
echo "Please specify “auth_token”"
|
|
exit 1
|
|
fi
|
|
|
|
netlify deploy -a "$PLUGIN_AUTH_TOKEN" -d "$PLUGIN_DIR" -m "$(git log -1 --pretty=%B)" $(
|
|
if [ -n "$PLUGIN_PROD" ]; then
|
|
echo "-p"
|
|
else
|
|
echo "--alias $(git log -1 --pretty=%H)"
|
|
fi
|
|
)
|