瀏覽代碼

fix import_main

ruduki2 5 年之前
父節點
當前提交
4c2892996b
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      Rakefile

+ 5 - 4
Rakefile

@@ -121,13 +121,14 @@ task import_main: %w(bundle_install) do
   file_set = Set.new(files)
   file_set = Set.new(files)
   base_excludes=%w[../stylesheet.tw2 ../storyjs.tw2 ../stylesheet.tw2 ../images.tw2]
   base_excludes=%w[../stylesheet.tw2 ../storyjs.tw2 ../stylesheet.tw2 ../images.tw2]
   files.each do |file|
   files.each do |file|
-    other_files = (file_set - Set.new(file)).map { |f| f.source_file }
-    excludes = others_files + base_excludes
+    other_files = (file_set - Set.new([file])).map { |f| File.basename(f.source_file) }
+    excludes = other_files + base_excludes
     sh(
     sh(
       'bundle', 'exec', 'twee2', 'decompile',
       'bundle', 'exec', 'twee2', 'decompile',
-      File.join(STORY_DIR, STORY_RELEASE_TITLE), file.source_file,
+      File.join(STORY_DIR, STORY_RELEASE_TITLE + '.html'),
+      './' + file.source_file,
       '--exclude=StoryJS,StoryCSS,StoryTitle',
       '--exclude=StoryJS,StoryCSS,StoryTitle',
-      "--exclude-from=../stylesheet.tw2,../storyjs.tw2,../stylesheet.tw2,../images.tw2',
+      "--exclude-from=#{excludes.join(',')}",
     )
     )
   end
   end
 end
 end