Skip to content

Commit 2d18704

Browse files
committed
check for GIT_COMMIT_SHA environment variable presence in GitDCommitSha.current_sha
1 parent b0a6df3 commit 2d18704

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/models/git_commit_sha.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ class GitCommitSha
55
attr_writer :current_sha
66

77
def self.current_sha
8-
@current_sha ||= retrieve_sha_from_file.presence || retrieve_sha_from_git
8+
@current_sha ||= ENV["GIT_COMMIT_SHA"].presence ||
9+
retrieve_sha_from_file.presence ||
10+
retrieve_sha_from_git
911
end
1012

1113
def self.reset_current_sha

0 commit comments

Comments
 (0)