Skip to content

Commit

Permalink
Merge pull request #5292 from mishaschwartz/v1.12.4
Browse files Browse the repository at this point in the history
V1.12.4
  • Loading branch information
mishaschwartz authored May 17, 2021
2 parents b858eb4 + 312d3ff commit 5709a7d
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 10 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [v1.12.4]
- Symlink git repo hooks (#5283)

## [v1.12.3]
- Add workaround for content security policy to allow loading blobs in Safari (#5273)

Expand Down
2 changes: 1 addition & 1 deletion app/MARKUS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=1.12.3,PATCH_LEVEL=DEV
VERSION=1.12.4,PATCH_LEVEL=DEV
7 changes: 6 additions & 1 deletion app/lib/git_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,15 @@ def self.create(connect_string)

# Set up server-side hooks
server_hooks.each do |hook_symbol, hook_script|
FileUtils.copy(hook_script, File.join(barepath, 'hooks', hook_symbol.to_s))
FileUtils.ln_s(hook_script, File.join(barepath, 'hooks', hook_symbol.to_s))
end
max_file_size_file = ::Rails.root + 'lib' + 'repo' + 'git_hooks' + 'max_file_size'
FileUtils.ln_s(max_file_size_file, File.join(barepath, 'hooks', 'max_file_size'))

GitRepository.do_commit_and_push(repo, 'Markus', I18n.t('repo.commits.initial'))
rescue StandardError
FileUtils.rm_rf(barepath)
raise
end
true
end
Expand Down
5 changes: 3 additions & 2 deletions app/models/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ def build_repository

begin
Repository.get_class.create(repo_path)
rescue Repository::RepositoryCollision => e
rescue StandardError => e
# log the collision
errors.add(:base, self.repo_name)
m_logger = MarkusLogger.instance
m_logger.log("Creating group '#{self.group_name}' caused repository collision " +
error_type = e.is_a?(Repository::RepositoryCollision) ? 'a repository collision' : 'an error'
m_logger.log("Creating group '#{self.group_name}' caused #{error_type} " \
"(Repository name was: '#{self.repo_name}'). Error message: '#{e.message}'",
MarkusLogger::ERROR)
raise
Expand Down
4 changes: 0 additions & 4 deletions config/initializers/activejob_status.rb

This file was deleted.

1 change: 1 addition & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ rails:
active_record:
verbose_query_logs: false
force_ssl: false
cache_store: redis_cache_store
session_store:
type: cookie_store
args:
Expand Down
1 change: 0 additions & 1 deletion config/settings/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ rails:
log_level: debug
active_support:
deprecation: stderr
cache_store: redis_cache_store
active_record:
verbose_query_logs: true
action_mailer:
Expand Down
1 change: 0 additions & 1 deletion lib/repo/git_hooks/multihook.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
max_file_size = f.read().strip()
hooks_dir = os.path.join(real_dir, '{}.d'.format(hook_type))
env = {**os.environ, 'MAX_FILE_SIZE': max_file_size}
print(env)
if os.path.exists(hooks_dir):
scripts = sorted([os.path.join(hooks_dir, f) for f in os.listdir(hooks_dir)])
for script in scripts:
Expand Down
1 change: 1 addition & 0 deletions lib/repo/git_hooks/update.d/04-file_size_too_large.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3

import os
import sys
import subprocess

Expand Down

0 comments on commit 5709a7d

Please sign in to comment.