Skip to content

Commit 14bb882

Browse files
gabrittoGabriela Araujo Britto
andauthored
Add assert option to hereby (#2977)
Co-authored-by: Gabriela Araujo Britto <gabrielaa@CPC-gabri-8SHBT.localdomain>
1 parent ede102e commit 14bb882

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Herebyfile.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const { values: rawOptions } = parseArgs({
6060
debug: { type: "boolean" },
6161
dirty: { type: "boolean" },
6262
release: { type: "boolean" },
63+
assert: { type: "boolean" },
6364

6465
setPrerelease: { type: "string" },
6566
forRelease: { type: "boolean" },
@@ -209,7 +210,7 @@ function buildTsgo(opts) {
209210
opts ||= {};
210211
const out = opts.out ?? "./built/local/";
211212
const env = { ...goBuildEnv, ...opts.env };
212-
return $({ cancelSignal: opts.abortSignal, env })`go build ${goBuildFlags} ${opts.extraFlags ?? []} ${options.debug ? goBuildTags("noembed") : goBuildTags("noembed", "noassert")} -o ${out} ./cmd/tsgo`;
213+
return $({ cancelSignal: opts.abortSignal, env })`go build ${goBuildFlags} ${opts.extraFlags ?? []} ${options.debug || options.assert ? goBuildTags("noembed") : goBuildTags("noembed", "noassert")} -o ${out} ./cmd/tsgo`;
213214
}
214215

215216
export const tsgoBuild = task({

0 commit comments

Comments
 (0)