Fix mina deploy issue (#1573)

Use git command to get origin/repo
This commit is contained in:
Alex Sherman 2020-04-20 13:40:03 +05:00 committed by GitHub
parent 6e30737bf0
commit 23642355bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View file

@ -34,12 +34,15 @@ module ApplicationHelper
end
def current_commit_link
hash = CURRENT_COMMIT_HASH
current_repo = CURRENT_COMMIT_REPO.gsub('com:', 'com/')
.gsub('git@', 'https://')
.gsub('.git', '')
hash = `git rev-parse --short HEAD`
current_repo = `git remote get-url origin`.gsub('com:', 'com/')
.gsub('git@', 'https://')
.gsub('.git', '')
link_to hash.to_s, "#{current_repo}/commit/#{hash}", class: 'footer-version-link'
link_to hash.to_s, "#{current_repo}/commit/#{hash}",
class: 'footer-version-link',
target: '_blank',
rel: 'noopener'
end
def creator_link(model)