mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
DEV: Do not add -theme
suffix to theme exports
This could be confusing if the theme name already ended in "theme" or "theme-component"
This commit is contained in:
parent
43f3bf71ba
commit
c0b1a1a914
@ -5,7 +5,7 @@ class ThemeStore::TgzExporter
|
|||||||
def initialize(theme)
|
def initialize(theme)
|
||||||
@theme = theme
|
@theme = theme
|
||||||
@temp_folder = "#{Pathname.new(Dir.tmpdir).realpath}/discourse_theme_#{SecureRandom.hex}"
|
@temp_folder = "#{Pathname.new(Dir.tmpdir).realpath}/discourse_theme_#{SecureRandom.hex}"
|
||||||
@export_name = "#{@theme.name.downcase.gsub(/[^0-9a-z.\-]/, '-')}-theme"
|
@export_name = @theme.name.downcase.gsub(/[^0-9a-z.\-]/, '-')
|
||||||
@export_name = "discourse-#{@export_name}" unless @export_name.starts_with?("discourse")
|
@export_name = "discourse-#{@export_name}" unless @export_name.starts_with?("discourse")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user