Skip to content

Commit

Permalink
Build before zipping, fixes #29; add flag to build caddy with debug s…
Browse files Browse the repository at this point in the history
…ymbols
  • Loading branch information
infogulch committed Jan 7, 2025
1 parent b5e5c85 commit e9c0554
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions make_tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ task: dist: {
mkdir: file.MkdirAll & {path: dir, $after: rmdist.$done}
build: task.build & {"vars": vars, outfile: "\(dir)/\(exe)", gobuild: {$after: mkdir.$done, "env": env & vars.env}}
cp: exec.Run & {cmd: ["cp", "README.md", "LICENSE", "\(dir)"], $after: mkdir.$done}
zip: exec.Run & {cmd: ["zip", "-jqr6", "\(dir)_\(vars.version).zip", dir], $after: cp.$done && build.$done}
zip: exec.Run & {cmd: ["zip", "-jqr6", "\(dir)_\(vars.version).zip", dir], $after: cp.$done & build.gobuild.$done}
}
}
}
Expand Down Expand Up @@ -185,6 +185,8 @@ task: push_docker: {
task: build_caddy: {
vars: #vars

flag: *"" | string @tag(debug,short=debug)

xbuild: exec.Run & {
cmd: ["bash", "-c",
"xcaddy build " +
Expand All @@ -195,7 +197,10 @@ task: build_caddy: {
"&>\(vars.testdir)/xcaddy.log",
]
dir: vars.rootdir
env: vars.env & {CGO_ENABLED: "1"}
env: vars.env & {
CGO_ENABLED: "1"
if flag == "debug" {XCADDY_DEBUG: "1"}
}
}
}

Expand Down

0 comments on commit e9c0554

Please sign in to comment.