9 Commits

Author SHA1 Message Date
Michael Stapelberg
52cab9f145 packer: stop using updateflag global state
related to https://github.com/gokrazy/tools/pull/68
2025-12-06 08:37:24 +01:00
Michael Stapelberg
2c805ed001 refactor cobra command initialization to avoid stale state
Before this commit, we held onto *cobra.Command objects,
but that is not actually supported: after the first Execute(),
commands like updateCmd are stuck on the first-ever provided ctx.

Instead, turn command initialization into functions.

I only noticed this when trying to do two 'gok update'
from within the same test, where the fake build timestamp
is injected via the context (the timestamp was always the same).
2025-11-29 10:47:48 +01:00
Michael Stapelberg
ab76ef531d update to latest gokrazy/updater (now needs a context) 2025-06-01 08:57:36 +02:00
Michael Stapelberg
4f97436034 implement Package.GoBuildEnvironment option
This allows setting e.g. CGO_ENABLED=1 for only specific programs.
2025-03-30 11:14:56 +02:00
thielepaul
b0f9892141 allow overriding basename in package config (#86)
related to https://github.com/gokrazy/gokrazy/issues/303
2025-02-27 20:28:19 +01:00
Michael Stapelberg
5f4d95c2d4 gok: apply Environment from config.json
For gok vm run, this means an explicit -arch=amd64 or -arch=arm64
might become necessary. In general, I recommend configuring
GOOS and GOARCH in config.json explicitly:

    {
        "Hostname": "repro",
        "Environment": [
            "GOOS=linux",
            "GOARCH=amd64"
        ],
    […]

related to https://github.com/gokrazy/gokrazy/issues/191
2025-01-26 22:43:19 +01:00
Michael Stapelberg
b4784d268c pull in latest gokrazy/updater for Divert() fallback fix 2023-02-06 23:05:40 +01:00
Mark Drayton
8c7ed9ae16 gok: pass command line flags to run 2023-02-06 20:54:01 +01:00
Michael Stapelberg
ce2433aa1a gok: move code to internal/gok 2023-01-29 19:30:23 +01:00