We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c719c1 commit c405c2cCopy full SHA for c405c2c
bin/deploy
@@ -0,0 +1,18 @@
1
+#!/usr/bin/env bash
2
+
3
+if [[ -n $RAILS_ENV && $RAILS_ENV != "development" ]]; then
4
+ echo "Refusing to run in $RAILS_ENV environment."
5
+ exit 1
6
+fi
7
8
+stash_message="deploy-$(date +%s)"
9
+stash_output="$(git stash save --include-untracked $stash_message)"
10
+stashed="$(echo $stash_output | grep $stash_message)"
11
12
+bin/rails runner "Rails.application.eager_load!" &&
13
+ git push &&
14
+ fly deploy --build-arg REVISION=$(git rev-parse HEAD) || exit 1
15
16
+if [[ "$stashed" ]]; then
17
+ git stash pop
18
0 commit comments