Commit 8707db80 authored by Douwe Maan's avatar Douwe Maan

Merge branch '29192-fix-emoji-node-modules-reference-for-unicode-versions' into 'master'

Fix reference to node_modules for emoji unicode versions

Closes #29192

See merge request !9810
parents 3d087956 3403bdc5
This diff is collapsed.
...@@ -31,7 +31,7 @@ module Gitlab ...@@ -31,7 +31,7 @@ module Gitlab
end end
def emoji_unicode_version(name) def emoji_unicode_version(name)
@emoji_unicode_versions_by_name ||= JSON.parse(File.read(Rails.root.join('node_modules', 'emoji-unicode-version', 'emoji-unicode-version-map.json'))) @emoji_unicode_versions_by_name ||= JSON.parse(File.read(Rails.root.join('fixtures', 'emojis', 'emoji-unicode-version-map.json')))
@emoji_unicode_versions_by_name[name] @emoji_unicode_versions_by_name[name]
end end
......
namespace :gemojione do namespace :gemojione do
desc 'Generates Emoji SHA256 digests' desc 'Generates Emoji SHA256 digests'
task digests: :environment do task digests: ['yarn:check', 'environment'] do
require 'digest/sha2' require 'digest/sha2'
require 'json' require 'json'
# We don't have `node_modules` available in built versions of GitLab
FileUtils.cp_r(Rails.root.join('node_modules', 'emoji-unicode-version', 'emoji-unicode-version-map.json'), File.join(Rails.root, 'fixtures', 'emojis'))
dir = Gemojione.images_path dir = Gemojione.images_path
resultant_emoji_map = {} resultant_emoji_map = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment