Commit a01359f
committed
fix(build): run xgo from project root so its package arg resolves cleanly
xgo treats its last positional arg as a Go package path. Running it from
build/ with `../` confused Go's module resolution — it tried to find a
package inside the build module instead of switching to the project's
own go.mod, failing with:
package code.vikunja.io/build: build constraints exclude all Go files
in /go/src/code.vikunja.io/api/build
Use exec.CommandContext with cmd.Dir set to the project's absolute root,
and pass p.BuildPath ("." or "./cmd/veans") as the package arg — the
exact pattern the per-project magefiles used before centralization.
-dest is absolutized so it still ends up under <project>/dist/binaries
regardless of cwd.1 parent 4e73694 commit a01359f
1 file changed
Lines changed: 22 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
483 | 494 | | |
484 | 495 | | |
485 | 496 | | |
486 | 497 | | |
487 | | - | |
| 498 | + | |
488 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
489 | 504 | | |
490 | 505 | | |
491 | 506 | | |
| |||
0 commit comments