comparison gui_ze/gui_ze.bzl @ 176:fed99fc04e12 hg-web

[HgWeb] Problem with the emscript lol
author MrJuneJune <me@mrjunejune.com>
date Wed, 21 Jan 2026 19:32:08 -0800
parents 71ad34a8bc9a
children 8cf4ec5e2191
comparison
equal deleted inserted replaced
175:71ad34a8bc9a 176:fed99fc04e12
174 outputs = [out], 174 outputs = [out],
175 tools = [ctx.executable._bun] + inputs, 175 tools = [ctx.executable._bun] + inputs,
176 command = """ 176 command = """
177 cp -r third_party/bun/** . \ 177 cp -r third_party/bun/** . \
178 && cp -r {src_folder}/** . \ 178 && cp -r {src_folder}/** . \
179 && cp -r ./bazel-out/k8-fastbuild/bin/hg-web/src/** src \
180 && ls src \
179 && export NODE_PATH=./node_modules && {bun_path} build {input_path} --outfile {output_path} --target browser 181 && export NODE_PATH=./node_modules && {bun_path} build {input_path} --outfile {output_path} --target browser
180 """.format( 182 """.format(
181 bun_path = ctx.executable._bun.path, 183 bun_path = ctx.executable._bun.path,
182 src_folder = ctx.attr.src_folder, 184 src_folder = ctx.attr.src_folder,
183 # Fix this lol 185 # Fix this lol
272 for src in srcs: 274 for src in srcs:
273 out = ctx.actions.declare_file(ctx.attr.dest + "/" + src.basename) 275 out = ctx.actions.declare_file(ctx.attr.dest + "/" + src.basename)
274 ctx.actions.run_shell( 276 ctx.actions.run_shell(
275 inputs = [src], 277 inputs = [src],
276 outputs = [out], 278 outputs = [out],
277 command = "cp \"$1\" \"$2\"", 279 command = "cp -r \"$1\" \"$2\"",
278 arguments = [src.path, out.path], 280 arguments = [src.path, out.path],
279 ) 281 )
280 outs.append(out) 282 outs.append(out)
281 return [DefaultInfo(files = depset(outs))] 283 return [DefaultInfo(files = depset(outs))]
282 284