Skip to content

Commit 7ed671a

Browse files
committed
determine revision
1 parent 38ec5c8 commit 7ed671a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

config/application.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
module RailsBump
1010
class Application < Rails::Application
1111
config.load_defaults 7.0
12-
config.revision = `git rev-parse --short HEAD 2> /dev/null`.chomp
12+
config.revision = `git rev-parse --short HEAD 2> /dev/null`.chomp.presence ||
13+
ENV["FLY_IMAGE_REF"]&.then { _1[/@sha256:([0-9a-f]+)/, 1] } or
14+
raise "Could not determine revision."
15+
1316
config.action_mailer.delivery_method = :postmark
1417
config.active_record.query_log_tags_enabled = true
1518

0 commit comments

Comments
 (0)