Skip to content

Instantly share code, notes, and snippets.

@GitaiQAQ
Last active February 16, 2022 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GitaiQAQ/9a223a42bc2a240d5bd46332c71e4295 to your computer and use it in GitHub Desktop.
Save GitaiQAQ/9a223a42bc2a240d5bd46332c71e4295 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# only-dev && only execute in dev env and throw an error in other
# only-dev || only execute in non-dev env and do nothing in other
if [[ $NODE_ENV =~ ^dev ]]
then
exit 0
fi
exit -1
#!/usr/bin/env bash
# only-prod && only execute in prod env and throw an error in other
# only-prod || only execute in non-prod env and do nothing in other
if [[ $NODE_ENV =~ ^prod ]]
then
exit 0
fi
exit -1
#!/usr/bin/env bash
# TODO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment