-
-
Save halo/67c2c907febe1966fb6087af4a45ea19 to your computer and use it in GitHub Desktop.
Common project helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Usage examples: | |
| # bin/dev | |
| # bin/dev sass | |
| # bin/dev puma sass | |
| if [ $# -eq 0 ]; then | |
| goreman -exit-on-error -f Procfile.dev start | |
| else | |
| goreman -exit-on-error -f Procfile.dev start "$@" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Exit when any command fails | |
| set -e | |
| rm -f *.gem | |
| gem build "$(basename "$(pwd)").gemspec" | |
| # Find all gem files in the current directory | |
| gem_files=( *.gem ) | |
| # Check the number of gem files found | |
| if [ ${#gem_files[@]} -eq 0 ]; then | |
| echo "No gem files found." | |
| exit 1 | |
| elif [ ${#gem_files[@]} -gt 1 ]; then | |
| echo "Error: Multiple gem files found. Please ensure there is only one gem file." | |
| exit 2 | |
| else | |
| # Push the single gem file | |
| gem push "${gem_files[0]}" | |
| fi | |
| bundle update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sass --fatal-deprecation=$(sass --version) --color |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment