Skip to content

Instantly share code, notes, and snippets.

@halo
Last active October 24, 2025 12:23
Show Gist options
  • Select an option

  • Save halo/67c2c907febe1966fb6087af4a45ea19 to your computer and use it in GitHub Desktop.

Select an option

Save halo/67c2c907febe1966fb6087af4a45ea19 to your computer and use it in GitHub Desktop.
Common project helpers
#!/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
#!/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
sass --fatal-deprecation=$(sass --version) --color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment