Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/placeos-frontend-loader/loader.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
Log = ::Log.for(self)

Habitat.create do
setting content_directory : String = WWW

Check warning on line 17 in src/placeos-frontend-loader/loader.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/UselessAssign

Useless assignment to variable `content_directory`
Raw output
> setting content_directory : String = WWW
          ^
setting update_crontab : String = CRON

Check warning on line 18 in src/placeos-frontend-loader/loader.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/UselessAssign

Useless assignment to variable `update_crontab`
Raw output
> setting update_crontab : String = CRON
          ^
end

class_getter instance : Loader do
Expand Down Expand Up @@ -200,6 +200,7 @@

# check for any relevant changes
rebuild_cache, old_folder_name = check_for_changes(repository)
Log.trace { {message: "check_for_changes", rebuild_cache: rebuild_cache, folder_name: old_folder_name} }
has_error = false
error_message = nil
# rebuild caches
Expand Down Expand Up @@ -235,9 +236,11 @@
if download_required
Log.trace { "#{repository.folder_name}: downloading new content" }
commit_ref = repository.commit_hash == "HEAD" ? repository.branch : repository.commit_hash
commit = if root = repository.root_path
commit = if (root = repository.root_path) && !root.blank?
Log.trace { "Fetching folder as root_path property is set: '#{root}', size: #{root.size}" }
cache.fetch_folder(commit_ref, root, repository_directory)
else
Log.trace { {message: "Fetching commit", commit_ref: commit_ref, repo_dir: repository_directory} }
cache.fetch_commit(commit_ref, repository_directory)
end

Expand Down
Loading