Skip to content

Instantly share code, notes, and snippets.

@jklingsporn
Last active May 3, 2017 10:34
Show Gist options
  • Save jklingsporn/3354110eb0a8814678075eed840bc1f3 to your computer and use it in GitHub Desktop.
Save jklingsporn/3354110eb0a8814678075eed840bc1f3 to your computer and use it in GitHub Desktop.
EB example build script
#!/bin/bash
set -e
now=$(date +"%Y-%m-%d_%H-%M-%S")
tag="./target/app-$now.zip"
mvn clean install
echo "web: ./run.sh" > target/Procfile
echo "exec java \$JAVA_OPTS -jar app.jar \$JAVA_ARGS" > target/run.sh
chmod +x target/run.sh
zip -j ${tag} target/Procfile target/run.sh target/app.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment