load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("@rules_cc//cc:cc_library.bzl", "cc_library") load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle") # Files move_files_into_dir( name = "react_pages", srcs = [ "//react_games:games" ], dest = "src/games", ) move_files_into_dir( name = "shared_js_non_public", srcs = [ "//markdown_converter:markdown_to_html", "//markdown_converter:markdown_to_html_wasm", ], dest = "src", ) move_files_into_dir( name = "shared_js_file", srcs = [ "//third_party/highlight:js", ], dest = "src/public/highlight", ) filegroup( name = "public_files", srcs = glob(["src/public/*"]), visibility = ["//visibility:public"], ) filegroup( name = "public_fonts_files", srcs = glob(["src/public/fonts/*"]), visibility = ["//visibility:public"], ) filegroup( name = "src_files", srcs = glob(["src/**"]) + [":react_pages", ":shared_js_non_public", "shared_js_file"], visibility = ["//mrjunejune/test:__pkg__"], ) # Server binary cc_binary( name = "mrjunejune_server", srcs = ["main.c"], deps = [ "//seobeo:seobeo", "//markdown_converter:markdown_to_html_c", "//s3:s3", ], data = [ ":src_files", ":config_file", "//:env_file", ], visibility = ["//mrjunejune/test:__pkg__"], ) # Debug build with verbose logging cc_binary( name = "mrjunejune_server_debug", srcs = ["main.c"], deps = [ "//seobeo:seobeo_debug", "//markdown_converter:markdown_to_html_c", "//s3:s3", ], data = [ ":src_files", ":config_file", "//:env_file", ], ) filegroup( name = "config_file", srcs = [".config"], visibility = ["//visibility:public"], ) # Run this to create html files cc_binary( name = "create_html_from_md", srcs = ["create_html_from_md.c"], deps = [ "//markdown_converter:markdown_to_html_c", "//dowa:dowa" ], data = [":src_files"], ) # Release bundle bundle( name = "mrjunejune_server_bundle", binary = ":mrjunejune_server", ) bundle( name = "mrjunejune_server_debug_bundle", binary = ":mrjunejune_server_debug", )