Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

release-heroku 916 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  1. #!/usr/bin/env bash
  2. # [start-readme]
  3. #
  4. # Light Bash wrapper for the Heroku release command, which sometimes fails
  5. # unexpectedly in staging environments when a Node installation is missing
  6. #
  7. # [end-readme]
  8. # Check for node but don't fail immediately if it's not present
  9. ./script/check-for-node
  10. EXIT_STATUS=$?
  11. # If node is missing...
  12. if [[ "$EXIT_STATUS" -ne "0" ]]; then
  13. # Fail hard if this is our Heroku production app or if Redis is configured
  14. if [[ "$HEROKU_PRODUCTION_APP" == "true" || -n "$REDIS_URL" ]]; then
  15. echo "Error: cannot execute the release script without Node.js, which is fatal."
  16. echo "Exiting..."
  17. exit $EXIT_STATUS
  18. # Otherwise succeed with only a warning
  19. else
  20. echo "Warning: although Node.js is missing, it is non-critical."
  21. echo "Exiting..."
  22. exit 0
  23. fi
  24. else
  25. # Execute the release script and exit with its status
  26. node script/purge-redis-pages.js
  27. exit $?
  28. fi
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...